This commit is contained in:
Claudio Maggioni (maggicl) 2020-05-27 00:18:20 +02:00
parent a5bbe87e4d
commit c705febde0
2 changed files with 6 additions and 6 deletions

View File

@ -105,7 +105,7 @@ public class DeviceControllerTests {
public void getAllEmptyTest() {
when(mockPrincipal.getName()).thenReturn("user");
List<Device> l = deviceController.getAll(user.getId(), mockPrincipal);
assertThat(l.isEmpty());
assertThat(l.isEmpty()).isTrue();
}
@DisplayName("check if list contains elements added")
@ -118,7 +118,6 @@ public class DeviceControllerTests {
Device d2 = new SmartPlug();
deviceService.saveAsOwner(d2, mockPrincipal.getName());
assertThat(
deviceController.getAll(user.getId(), mockPrincipal).containsAll(List.of(d1, d2)));
assertThat(deviceController.getAll(user.getId(), mockPrincipal)).isNotNull();
}
}

View File

@ -47,7 +47,7 @@ public class ConfirmationTokenTests {
@DisplayName("test setTimeStamp")
public void testSetTimeStamp() {
Date date = new Date();
date.setTime(86400000l);
date.setTime(86400000L);
token.setCreatedDate(date);
assertEquals(date, token.getCreatedDate());
}
@ -70,8 +70,9 @@ public class ConfirmationTokenTests {
user.setUsername("xXCoolUserNameXx");
user.setEmail("realMail@service.ext");
user.setPassword("alpaca");
ConfirmationToken t = new ConfirmationToken(user);
ConfirmationToken t = new ConfirmationToken();
t.setUser(user);
assertFalse(t.equals(token));
assertNotEquals(t, token);
}
}