Skip to content

Commit

Permalink
openhab#15 Refactor parametrized tests
Browse files Browse the repository at this point in the history
  • Loading branch information
magx2 committed May 17, 2019
1 parent bb7c43a commit ed91d6a
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ void lightChannelOff() throws Exception {
assertThat(value.getAction()).isEqualTo(TURN_OFF);
}

@DisplayName("OPEN gate, garage")
@ParameterizedTest(name = "[{index}] should send request to Supla Cloud to open {0}")
@DisplayName("should send request to Supla Cloud to open gate or garage door")
@ParameterizedTest
@ValueSource(strings = {"gateChannelId", "garageDoorChannelId"})
void gateChannelOn(String idFieldName) throws Exception {

Expand All @@ -257,9 +257,9 @@ void gateChannelOn(String idFieldName) throws Exception {
assertThat(value.getAction()).isEqualTo(OPEN);
}

@ParameterizedTest(name = "[{index}] should send request to Supla Cloud to close {0}")
@ParameterizedTest
@ValueSource(strings = {"gateChannelId", "garageDoorChannelId"})
@DisplayName("CLOSE gate, garage")
@DisplayName("should send request to Supla Cloud to close gate or garage door")
void gateChannelOff(String idFieldName) throws Exception {

// given
Expand All @@ -275,8 +275,8 @@ void gateChannelOff(String idFieldName) throws Exception {
assertThat(value.getAction()).isEqualTo(CLOSE);
}

@DisplayName("OPEN gate, garage")
@ParameterizedTest(name = "[{index}] should send request to Supla Cloud to open {0}")
@DisplayName("should send request to Supla Cloud to open gate or garage door")
@ParameterizedTest
@ValueSource(strings = {"gateChannelId", "garageDoorChannelId"})
void gateChannelOpen(String idFieldName) throws Exception {

Expand All @@ -293,9 +293,9 @@ void gateChannelOpen(String idFieldName) throws Exception {
assertThat(value.getAction()).isEqualTo(OPEN);
}

@ParameterizedTest(name = "[{index}] should send request to Supla Cloud to close {0}")
@ParameterizedTest
@ValueSource(strings = {"gateChannelId", "garageDoorChannelId"})
@DisplayName("CLOSE gate, garage")
@DisplayName("should send request to Supla Cloud to close gate or garage door")
void gateChannelClose(String idFieldName) throws Exception {

// given
Expand Down Expand Up @@ -361,7 +361,7 @@ void revealPartiallyRollerShutter() throws Exception {
assertThat(value.getPercentage()).isEqualTo(percentage);
}

@ParameterizedTest(name = "[{index}] {0}")
@ParameterizedTest
@ValueSource(strings = {"rgbChannelId", "dimmerAndRgbChannelId"})
@DisplayName("should send request to LedExecutor to change color brightness")
void revealPartiallyRollerShutter(String idFieldName) throws Exception {
Expand Down

0 comments on commit ed91d6a

Please sign in to comment.