Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jan N. Klug <[email protected]>
  • Loading branch information
J-N-K committed May 19, 2023
1 parent 2411e7d commit 3cea526
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 141 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.mockito.junit.jupiter.MockitoExtension;
import org.openhab.core.library.types.OnOffType;
import org.openhab.core.thing.profiles.ProfileCallback;
import org.openhab.core.types.TimeSeries;

/**
*
Expand Down Expand Up @@ -60,4 +61,15 @@ public void testPostCommand() {
verify(callbackMock).sendCommand(eq(OnOffType.ON));
verifyNoMoreInteractions(callbackMock);
}

@Test
public void testSendTimeSeries() {
TimeSeries timeSeries = new TimeSeries(TimeSeries.Policy.ADD);

SystemDefaultProfile profile = new SystemDefaultProfile(callbackMock);
profile.onTimeSeriesFromHandler(timeSeries);

verify(callbackMock).sendTimeSeries(timeSeries);
verifyNoMoreInteractions(callbackMock);
}
}

0 comments on commit 3cea526

Please sign in to comment.