Skip to content

Commit

Permalink
Remove redundant test
Browse files Browse the repository at this point in the history
Signed-off-by: Anders Alfredsson <[email protected]>
  • Loading branch information
pacive committed Jul 14, 2024
1 parent 64c728b commit 0cf1414
Showing 1 changed file with 0 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,35 +48,6 @@ public class AbstractStorageBasedTypeProviderTest {

@Test
public void testStateChannelTypeProperlyMappedToEntityAndBack() {
ChannelTypeUID channelTypeUID = new ChannelTypeUID("TestBinding:testChannelType");

ChannelType expected = ChannelTypeBuilder.state(channelTypeUID, "testLabel", "Switch")
.withDescription("testDescription").withCategory("testCategory")
.withConfigDescriptionURI(URI.create("testBinding:testConfig"))
.withAutoUpdatePolicy(AutoUpdatePolicy.VETO).isAdvanced(true).withTag("testTag")
.withCommandDescription(CommandDescriptionBuilder.create().build())
.withStateDescriptionFragment(StateDescriptionFragmentBuilder.create().build()).build();
AbstractStorageBasedTypeProvider.ChannelTypeEntity entity = AbstractStorageBasedTypeProvider
.mapToEntity(expected);
ChannelType actual = AbstractStorageBasedTypeProvider.mapFromEntity(entity);

assertThat(actual.getUID(), is(expected.getUID()));
assertThat(actual.getKind(), is(expected.getKind()));
assertThat(actual.getLabel(), is(expected.getLabel()));
assertThat(actual.getDescription(), is(expected.getDescription()));
assertThat(actual.getConfigDescriptionURI(), is(expected.getConfigDescriptionURI()));
assertThat(actual.isAdvanced(), is(expected.isAdvanced()));
assertThat(actual.getAutoUpdatePolicy(), is(expected.getAutoUpdatePolicy()));
assertThat(actual.getCategory(), is(expected.getCategory()));
assertThat(actual.getEvent(), is(expected.getEvent()));
assertThat(actual.getCommandDescription(), is(expected.getCommandDescription()));
assertThat(actual.getState(), is(expected.getState()));
assertThat(actual.getItemType(), is(expected.getItemType()));
assertThat(actual.getTags(), hasItems(expected.getTags().toArray(String[]::new)));
}

@Test
public void testQuantityChannelTypeProperlyMappedToEntityAndBack() {
ChannelTypeUID channelTypeUID = new ChannelTypeUID("TestBinding:testQuantityChannelType");

ChannelType expected = ChannelTypeBuilder.state(channelTypeUID, "testLabel", "Number:Length")
Expand Down

0 comments on commit 0cf1414

Please sign in to comment.