Skip to content

Commit 2414c85

Browse files
committed
add test case
1 parent 0e52da3 commit 2414c85

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/test/java/de/rwth/idsg/steve/utils/TransactionStopServiceHelperTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,14 @@ public void testIsEnergy_nonNumericValue() {
152152

153153
Assertions.assertFalse(TransactionStopServiceHelper.isEnergyValue(value));
154154
}
155+
156+
@Test
157+
public void testIsEnergy_valueAndUnit() {
158+
var value = TransactionDetails.MeterValues.builder()
159+
.value("22")
160+
.unit("Wh")
161+
.build();
162+
163+
Assertions.assertTrue(TransactionStopServiceHelper.isEnergyValue(value));
164+
}
155165
}

0 commit comments

Comments
 (0)