fixed sensorsaverequest
This commit is contained in:
parent
be5ab5b4b3
commit
266fc3af9e
1 changed files with 12 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
import ch.usi.inf.sa4.sanmarinoes.smarthut.dto.SensorSaveRequest;
|
||||
import ch.usi.inf.sa4.sanmarinoes.smarthut.models.Sensor;
|
||||
|
@ -26,6 +27,17 @@ public class SensorSaveRequestTests {
|
|||
assertEquals(42L, sensor.getRoomId());
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("test constructor")
|
||||
public void testConstructorNotEmpty() {
|
||||
SensorSaveRequest newSaveRequest =
|
||||
new SensorSaveRequest(Sensor.SensorType.HUMIDITY, new BigDecimal(12), 12L, "name");
|
||||
assertNotNull(newSaveRequest.getSensor());
|
||||
assertNotNull(newSaveRequest.getName());
|
||||
assertNotNull(newSaveRequest.getRoomId());
|
||||
assertNotNull(newSaveRequest.getValue());
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("test setName")
|
||||
public void testSetName() {
|
||||
|
|
Loading…
Reference in a new issue