Merge branch 'tests' into 'dev'
Reorganized tests See merge request sa4-2020/the-sanmarinoes/backend!156
This commit is contained in:
commit
9f03f75bcb
41 changed files with 41 additions and 52 deletions
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.dto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.dto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import ch.usi.inf.sa4.sanmarinoes.smarthut.dto.SceneSaveRequest;
|
||||
import ch.usi.inf.sa4.sanmarinoes.smarthut.models.Icon;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.DisplayName;
|
|
@ -1,9 +1,8 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.dto;
|
||||
|
||||
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;
|
||||
import java.math.BigDecimal;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
|
@ -1,8 +1,7 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.dto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import ch.usi.inf.sa4.sanmarinoes.smarthut.dto.SwitchOperationRequest;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
|
@ -1,8 +1,7 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.dto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import ch.usi.inf.sa4.sanmarinoes.smarthut.dto.SwitchableSaveRequest;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
|
@ -1,8 +1,7 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.dto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import ch.usi.inf.sa4.sanmarinoes.smarthut.dto.SwitchableStateSaveRequest;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
|
@ -1,8 +1,7 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.dto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import ch.usi.inf.sa4.sanmarinoes.smarthut.dto.ThermostatConditionSaveRequest;
|
||||
import ch.usi.inf.sa4.sanmarinoes.smarthut.models.Thermostat;
|
||||
import ch.usi.inf.sa4.sanmarinoes.smarthut.models.ThermostatCondition;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
|
@ -1,8 +1,7 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.dto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import ch.usi.inf.sa4.sanmarinoes.smarthut.dto.ThermostatSaveRequest;
|
||||
import java.math.BigDecimal;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.DisplayName;
|
|
@ -1,8 +1,7 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.dto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import ch.usi.inf.sa4.sanmarinoes.smarthut.dto.UserRegistrationRequest;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
|
@ -1,8 +1,7 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.dto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import ch.usi.inf.sa4.sanmarinoes.smarthut.dto.UserResponse;
|
||||
import ch.usi.inf.sa4.sanmarinoes.smarthut.models.User;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.DisplayName;
|
|
@ -1,8 +1,7 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.error;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import ch.usi.inf.sa4.sanmarinoes.smarthut.error.*;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.model;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut;
|
||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.utils;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
@ -6,7 +6,6 @@ import static org.mockito.Mockito.when;
|
|||
import ch.usi.inf.sa4.sanmarinoes.smarthut.error.NotFoundException;
|
||||
import ch.usi.inf.sa4.sanmarinoes.smarthut.models.User;
|
||||
import ch.usi.inf.sa4.sanmarinoes.smarthut.models.UserRepository;
|
||||
import ch.usi.inf.sa4.sanmarinoes.smarthut.utils.Utils;
|
||||
import java.security.Principal;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
Loading…
Reference in a new issue