Skip to content

Commit

Permalink
openhab#15 Test for refreshing roller shutter
Browse files Browse the repository at this point in the history
  • Loading branch information
magx2 committed May 17, 2019
1 parent 0fb13f7 commit f86be20
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,22 @@ void dimmerAndRgbNotRefresh() throws Exception {
verify(callback, times(0)).stateUpdated(eq(channelUID), any());
}

@Test
@DisplayName("should refresh roller shutter")
void reollerShutterRefresh() throws Exception {

// given
final ChannelUID channelUID = findRollerShutterChannelUID();
final int shut = 13;
given(rollerShutterChannel.getState()).willReturn(new ChannelState().setShut(shut));

// when
handler.handleRefreshCommand(channelUID);

// then
verifyUpdateState(channelUID, new PercentType(shut));
}

ChannelUID buildChannelUID(int id) {
return new ChannelUID(thingUID, valueOf(id));
}
Expand Down

0 comments on commit f86be20

Please sign in to comment.