Fix new line after @Test (#2486)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -34,7 +34,8 @@ class DdiActionFeedbackTest {
|
||||
/**
|
||||
* Verify the correct serialization and deserialization of the model with minimal payload
|
||||
*/
|
||||
@Test void shouldSerializeAndDeserializeObjectWithoutOptionalValues() throws IOException {
|
||||
@Test
|
||||
void shouldSerializeAndDeserializeObjectWithoutOptionalValues() throws IOException {
|
||||
// Setup
|
||||
final DdiStatus ddiStatus = new DdiStatus(DdiStatus.ExecutionStatus.CLOSED, null, null, Collections.emptyList());
|
||||
final DdiActionFeedback ddiActionFeedback = new DdiActionFeedback(ddiStatus);
|
||||
@@ -50,7 +51,8 @@ class DdiActionFeedbackTest {
|
||||
/**
|
||||
* Verify the correct serialization and deserialization of the model with all values provided
|
||||
*/
|
||||
@Test void shouldSerializeAndDeserializeObjectWithOptionalValues() throws IOException {
|
||||
@Test
|
||||
void shouldSerializeAndDeserializeObjectWithOptionalValues() throws IOException {
|
||||
// Setup
|
||||
final Long timestamp = System.currentTimeMillis();
|
||||
final DdiResult ddiResult = new DdiResult(DdiResult.FinalResult.SUCCESS, new DdiProgress(10, 10));
|
||||
@@ -68,7 +70,8 @@ class DdiActionFeedbackTest {
|
||||
/**
|
||||
* Verify that deserialization fails for known properties with a wrong datatype
|
||||
*/
|
||||
@Test void shouldFailForObjectWithWrongDataTypes() {
|
||||
@Test
|
||||
void shouldFailForObjectWithWrongDataTypes() {
|
||||
// Setup
|
||||
final String serializedDdiActionFeedback = """
|
||||
{
|
||||
@@ -87,7 +90,8 @@ class DdiActionFeedbackTest {
|
||||
/**
|
||||
* Verify that deserialization works if optional fields are not parsed
|
||||
*/
|
||||
@Test void shouldConvertItWithoutOptionalFieldTimestamp() throws JsonProcessingException {
|
||||
@Test
|
||||
void shouldConvertItWithoutOptionalFieldTimestamp() throws JsonProcessingException {
|
||||
// Setup
|
||||
final String serializedDdiActionFeedback = """
|
||||
{
|
||||
|
||||
@@ -34,7 +34,8 @@ class DdiActionHistoryTest {
|
||||
/**
|
||||
* Verify the correct serialization and deserialization of the model
|
||||
*/
|
||||
@Test void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
@Test
|
||||
void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
// Setup
|
||||
final String actionStatus = "TestAction";
|
||||
final List<String> messages = Arrays.asList("Action status message 1", "Action status message 2");
|
||||
@@ -50,7 +51,8 @@ class DdiActionHistoryTest {
|
||||
/**
|
||||
* Verify the correct deserialization of a model with a additional unknown property
|
||||
*/
|
||||
@Test void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
@Test
|
||||
void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
// Setup
|
||||
final String serializedDdiActionHistory = """
|
||||
{
|
||||
@@ -67,7 +69,8 @@ class DdiActionHistoryTest {
|
||||
/**
|
||||
* Verify that deserialization fails for known properties with a wrong datatype
|
||||
*/
|
||||
@Test void shouldFailForObjectWithWrongDataTypes() {
|
||||
@Test
|
||||
void shouldFailForObjectWithWrongDataTypes() {
|
||||
// Setup
|
||||
final String serializedDdiActionFeedback = """
|
||||
{
|
||||
|
||||
@@ -32,7 +32,8 @@ class DdiArtifactHashTest {
|
||||
/**
|
||||
* Verify the correct serialization and deserialization of the model
|
||||
*/
|
||||
@Test void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
@Test
|
||||
void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
// Setup
|
||||
final String sha1Hash = "11111";
|
||||
final String md5Hash = "22222";
|
||||
@@ -51,7 +52,8 @@ class DdiArtifactHashTest {
|
||||
/**
|
||||
* Verify the correct deserialization of a model with a additional unknown property
|
||||
*/
|
||||
@Test void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
@Test
|
||||
void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
// Setup
|
||||
final String serializedDdiArtifact = "{\"sha1\": \"123\", \"md5\": \"456\", \"sha256\": \"789\", \"unknownProperty\": \"test\"}";
|
||||
|
||||
@@ -65,7 +67,8 @@ class DdiArtifactHashTest {
|
||||
/**
|
||||
* Verify that deserialization fails for known properties with a wrong datatype
|
||||
*/
|
||||
@Test void shouldFailForObjectWithWrongDataTypes() {
|
||||
@Test
|
||||
void shouldFailForObjectWithWrongDataTypes() {
|
||||
// Setup
|
||||
final String serializedDdiArtifact = "{\"sha1\": [123], \"md5\": 456, \"sha256\": \"789\"";
|
||||
|
||||
|
||||
@@ -32,7 +32,8 @@ class DdiArtifactTest {
|
||||
/**
|
||||
* Verify the correct serialization and deserialization of the model
|
||||
*/
|
||||
@Test void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
@Test
|
||||
void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
// Setup
|
||||
final String filename = "testfile.txt";
|
||||
final DdiArtifactHash hashes = new DdiArtifactHash("123", "456", "789");
|
||||
@@ -54,7 +55,8 @@ class DdiArtifactTest {
|
||||
/**
|
||||
* Verify the correct deserialization of a model with a additional unknown property
|
||||
*/
|
||||
@Test void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
@Test
|
||||
void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
// Setup
|
||||
final String serializedDdiArtifact = "{\"filename\":\"test.file\",\"hashes\":{\"sha1\":\"123\",\"md5\":\"456\",\"sha256\":\"789\"},\"size\":111,\"links\":[],\"unknownProperty\": \"test\"}";
|
||||
|
||||
@@ -70,7 +72,8 @@ class DdiArtifactTest {
|
||||
/**
|
||||
* Verify that deserialization fails for known properties with a wrong datatype
|
||||
*/
|
||||
@Test void shouldFailForObjectWithWrongDataTypes() {
|
||||
@Test
|
||||
void shouldFailForObjectWithWrongDataTypes() {
|
||||
// Setup
|
||||
final String serializedDdiArtifact = "{\"filename\": [\"test.file\"],\"hashes\":{\"sha1\":\"123\",\"md5\":\"456\",\"sha256\":\"789\"},\"size\":111,\"links\":[]}";
|
||||
|
||||
|
||||
@@ -32,7 +32,8 @@ class DdiCancelActionToStopTest {
|
||||
/**
|
||||
* Verify the correct serialization and deserialization of the model
|
||||
*/
|
||||
@Test void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
@Test
|
||||
void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
// Setup
|
||||
final String stopId = "1234";
|
||||
final DdiCancelActionToStop ddiCancelActionToStop = new DdiCancelActionToStop(stopId);
|
||||
@@ -48,7 +49,8 @@ class DdiCancelActionToStopTest {
|
||||
/**
|
||||
* Verify the correct deserialization of a model with a additional unknown property
|
||||
*/
|
||||
@Test void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
@Test
|
||||
void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
// Setup
|
||||
final String serializedDdiCancelActionToStop = "{\"stopId\":\"12345\",\"unknownProperty\":\"test\"}";
|
||||
|
||||
@@ -61,7 +63,8 @@ class DdiCancelActionToStopTest {
|
||||
/**
|
||||
* Verify that deserialization fails for known properties with a wrong datatype
|
||||
*/
|
||||
@Test void shouldFailForObjectWithWrongDataTypes() {
|
||||
@Test
|
||||
void shouldFailForObjectWithWrongDataTypes() {
|
||||
// Setup
|
||||
final String serializedDdiCancelActionToStop = "{\"stopId\": [\"12345\"]}";
|
||||
|
||||
|
||||
@@ -32,7 +32,8 @@ class DdiCancelTest {
|
||||
/**
|
||||
* Verify the correct serialization and deserialization of the model
|
||||
*/
|
||||
@Test void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
@Test
|
||||
void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
// Setup
|
||||
final String ddiCancelId = "1234";
|
||||
final DdiCancelActionToStop ddiCancelActionToStop = new DdiCancelActionToStop("1234");
|
||||
@@ -49,7 +50,8 @@ class DdiCancelTest {
|
||||
/**
|
||||
* Verify the correct deserialization of a model with a additional unknown property
|
||||
*/
|
||||
@Test void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
@Test
|
||||
void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
// Setup
|
||||
final String serializedDdiCancel = "{\"id\":\"1234\",\"cancelAction\":{\"stopId\":\"1234\"}, \"unknownProperty\": \"test\"}";
|
||||
|
||||
@@ -62,7 +64,8 @@ class DdiCancelTest {
|
||||
/**
|
||||
* Verify that deserialization fails for known properties with a wrong datatype
|
||||
*/
|
||||
@Test void shouldFailForObjectWithWrongDataTypes() {
|
||||
@Test
|
||||
void shouldFailForObjectWithWrongDataTypes() {
|
||||
// Setup
|
||||
final String serializedDdiCancel = "{\"id\":[\"1234\"],\"cancelAction\":{\"stopId\":\"1234\"}}";
|
||||
|
||||
|
||||
@@ -34,7 +34,8 @@ class DdiChunkTest {
|
||||
/**
|
||||
* Verify the correct serialization and deserialization of the model
|
||||
*/
|
||||
@Test void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
@Test
|
||||
void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
// Setup
|
||||
final String part = "1234";
|
||||
final String version = "1.0";
|
||||
@@ -55,7 +56,8 @@ class DdiChunkTest {
|
||||
/**
|
||||
* Verify the correct deserialization of a model with a additional unknown property
|
||||
*/
|
||||
@Test void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
@Test
|
||||
void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
// Setup
|
||||
final String serializedDdiChunk = "{\"part\":\"1234\",\"version\":\"1.0\",\"name\":\"Dummy-Artifact\",\"artifacts\":[],\"unknownProperty\":\"test\"}";
|
||||
|
||||
@@ -70,7 +72,8 @@ class DdiChunkTest {
|
||||
/**
|
||||
* Verify that deserialization fails for known properties with a wrong datatype
|
||||
*/
|
||||
@Test void shouldFailForObjectWithWrongDataTypes() {
|
||||
@Test
|
||||
void shouldFailForObjectWithWrongDataTypes() {
|
||||
// Setup
|
||||
final String serializedDdiChunk = "{\"part\":[\"1234\"],\"version\":\"1.0\",\"name\":\"Dummy-Artifact\",\"artifacts\":[]}";
|
||||
|
||||
|
||||
@@ -34,7 +34,8 @@ class DdiConfigDataTest {
|
||||
/**
|
||||
* Verify the correct serialization and deserialization of the model
|
||||
*/
|
||||
@Test void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
@Test
|
||||
void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
// Setup
|
||||
final Map<String, String> data = new HashMap<>();
|
||||
data.put("test", "data");
|
||||
@@ -50,7 +51,8 @@ class DdiConfigDataTest {
|
||||
/**
|
||||
* Verify the correct deserialization of a model with an additional unknown property
|
||||
*/
|
||||
@Test void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
@Test
|
||||
void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
// Setup
|
||||
final String serializedDdiConfigData = "{\"data\":{\"test\":\"data\"},\"mode\":\"replace\",\"unknownProperty\":\"test\"}";
|
||||
|
||||
@@ -62,7 +64,8 @@ class DdiConfigDataTest {
|
||||
/**
|
||||
* Verify that deserialization fails for known properties with a wrong datatype
|
||||
*/
|
||||
@Test void shouldFailForObjectWithWrongDataTypes() {
|
||||
@Test
|
||||
void shouldFailForObjectWithWrongDataTypes() {
|
||||
// Setup
|
||||
final String serializedDdiConfigData = "{\"data\":{\"test\":\"data\"},\"mode\":[\"replace\"],\"unknownProperty\":\"test\"}";
|
||||
|
||||
@@ -74,7 +77,8 @@ class DdiConfigDataTest {
|
||||
/**
|
||||
* Verify the correct deserialization of a model with removed unused status property
|
||||
*/
|
||||
@Test void shouldDeserializeObjectWithStatusProperty() throws IOException {
|
||||
@Test
|
||||
void shouldDeserializeObjectWithStatusProperty() throws IOException {
|
||||
// We formerly falsely required a 'status' property object when using the
|
||||
// configData endpoint. It was removed as a requirement from code and
|
||||
// documentation, as it was unused. This test ensures we still behave correctly
|
||||
|
||||
@@ -32,7 +32,8 @@ class DdiConfigTest {
|
||||
/**
|
||||
* Verify the correct serialization and deserialization of the model
|
||||
*/
|
||||
@Test void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
@Test
|
||||
void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
// Setup
|
||||
final DdiPolling ddiPolling = new DdiPolling("10");
|
||||
final DdiConfig ddiConfig = new DdiConfig(ddiPolling);
|
||||
@@ -47,7 +48,8 @@ class DdiConfigTest {
|
||||
/**
|
||||
* Verify the correct deserialization of a model with a additional unknown property
|
||||
*/
|
||||
@Test void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
@Test
|
||||
void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
// Setup
|
||||
final String serializedDdiConfig = "{\"polling\":{\"sleep\":\"123\"},\"unknownProperty\":\"test\"}";
|
||||
|
||||
@@ -59,7 +61,8 @@ class DdiConfigTest {
|
||||
/**
|
||||
* Verify that deserialization fails for known properties with a wrong datatype
|
||||
*/
|
||||
@Test void shouldFailForObjectWithWrongDataTypes() {
|
||||
@Test
|
||||
void shouldFailForObjectWithWrongDataTypes() {
|
||||
// Setup
|
||||
final String serializedDdiConfig = "{\"polling\":{\"sleep\":[\"10\"]}}";
|
||||
|
||||
|
||||
@@ -37,7 +37,8 @@ class DdiConfirmationBaseTest {
|
||||
/**
|
||||
* Verify the correct serialization and deserialization of the model
|
||||
*/
|
||||
@Test void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
@Test
|
||||
void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
// Setup
|
||||
final String id = "1234";
|
||||
final DdiDeployment ddiDeployment = new DdiDeployment(FORCED, ATTEMPT, Collections.emptyList(), AVAILABLE);
|
||||
@@ -65,7 +66,8 @@ class DdiConfirmationBaseTest {
|
||||
/**
|
||||
* Verify the correct deserialization of a model with a additional unknown property
|
||||
*/
|
||||
@Test void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
@Test
|
||||
void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
// Setup
|
||||
final String serializedDdiConfirmationBase = "{" +
|
||||
"\"id\":\"1234\",\"confirmation\":{\"download\":\"forced\"," +
|
||||
@@ -87,7 +89,8 @@ class DdiConfirmationBaseTest {
|
||||
/**
|
||||
* Verify that deserialization fails for known properties with a wrong datatype
|
||||
*/
|
||||
@Test void shouldFailForObjectWithWrongDataTypes() {
|
||||
@Test
|
||||
void shouldFailForObjectWithWrongDataTypes() {
|
||||
// Setup
|
||||
final String serializedDdiConfirmationBase = "{" +
|
||||
"\"id\":[\"1234\"],\"confirmation\":{\"download\":\"forced\"," +
|
||||
|
||||
@@ -32,7 +32,8 @@ class DdiControllerBaseTest {
|
||||
/**
|
||||
* Verify the correct serialization and deserialization of the model
|
||||
*/
|
||||
@Test void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
@Test
|
||||
void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
// Setup
|
||||
final DdiPolling ddiPolling = new DdiPolling("10");
|
||||
final DdiConfig ddiConfig = new DdiConfig(ddiPolling);
|
||||
@@ -48,7 +49,8 @@ class DdiControllerBaseTest {
|
||||
/**
|
||||
* Verify the correct deserialization of a model with a additional unknown property
|
||||
*/
|
||||
@Test void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
@Test
|
||||
void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
// Setup
|
||||
final String serializedDdiControllerBase = "{\"config\":{\"polling\":{\"sleep\":\"123\"}},\"links\":[],\"unknownProperty\":\"test\"}";
|
||||
|
||||
@@ -60,7 +62,8 @@ class DdiControllerBaseTest {
|
||||
/**
|
||||
* Verify that deserialization fails for known properties with a wrong datatype
|
||||
*/
|
||||
@Test void shouldFailForObjectWithWrongDataTypes() {
|
||||
@Test
|
||||
void shouldFailForObjectWithWrongDataTypes() {
|
||||
// Setup
|
||||
final String serializedDdiControllerBase = "{\"config\":{\"polling\":{\"sleep\":[\"123\"]}},\"links\":[],\"unknownProperty\":\"test\"}";
|
||||
|
||||
|
||||
@@ -37,7 +37,8 @@ class DdiDeploymentBaseTest {
|
||||
/**
|
||||
* Verify the correct serialization and deserialization of the model
|
||||
*/
|
||||
@Test void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
@Test
|
||||
void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
// Setup
|
||||
final String id = "1234";
|
||||
final DdiDeployment ddiDeployment = new DdiDeployment(FORCED, ATTEMPT, Collections.emptyList(), AVAILABLE);
|
||||
@@ -59,7 +60,8 @@ class DdiDeploymentBaseTest {
|
||||
/**
|
||||
* Verify the correct deserialization of a model with a additional unknown property
|
||||
*/
|
||||
@Test void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
@Test
|
||||
void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
// Setup
|
||||
final String serializedDdiDeploymentBase = "{\"id\":\"1234\",\"deployment\":{\"download\":\"forced\"," +
|
||||
"\"update\":\"attempt\",\"maintenanceWindow\":\"available\",\"chunks\":[]}," +
|
||||
@@ -76,7 +78,8 @@ class DdiDeploymentBaseTest {
|
||||
/**
|
||||
* Verify that deserialization fails for known properties with a wrong datatype
|
||||
*/
|
||||
@Test void shouldFailForObjectWithWrongDataTypes() {
|
||||
@Test
|
||||
void shouldFailForObjectWithWrongDataTypes() {
|
||||
// Setup
|
||||
final String serializedDdiDeploymentBase = "{\"id\":[\"1234\"],\"deployment\":{\"download\":\"forced\"," +
|
||||
"\"update\":\"attempt\",\"maintenanceWindow\":\"available\",\"chunks\":[]}," +
|
||||
|
||||
@@ -36,7 +36,8 @@ class DdiDeploymentTest {
|
||||
/**
|
||||
* Verify the correct serialization and deserialization of the model
|
||||
*/
|
||||
@Test void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
@Test
|
||||
void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
// Setup
|
||||
final DdiDeployment ddiDeployment = new DdiDeployment(FORCED, ATTEMPT, Collections.emptyList(), AVAILABLE);
|
||||
|
||||
@@ -53,7 +54,8 @@ class DdiDeploymentTest {
|
||||
/**
|
||||
* Verify the correct deserialization of a model with a additional unknown property
|
||||
*/
|
||||
@Test void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
@Test
|
||||
void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
// Setup
|
||||
final String serializedDdiDeployment = "{\"download\":\"forced\",\"update\":\"attempt\", " +
|
||||
"\"maintenanceWindow\":\"available\",\"chunks\":[],\"unknownProperty\":\"test\"}";
|
||||
@@ -68,7 +70,8 @@ class DdiDeploymentTest {
|
||||
/**
|
||||
* Verify that deserialization fails for known properties with a wrong datatype
|
||||
*/
|
||||
@Test void shouldFailForObjectWithWrongDataTypes() {
|
||||
@Test
|
||||
void shouldFailForObjectWithWrongDataTypes() {
|
||||
// Setup
|
||||
final String serializedDdiDeployment = "{\"download\":[\"forced\"],\"update\":\"attempt\", " +
|
||||
"\"maintenanceWindow\":\"available\",\"chunks\":[]}";
|
||||
|
||||
@@ -32,7 +32,8 @@ class DdiMetadataTest {
|
||||
/**
|
||||
* Verify the correct serialization and deserialization of the model
|
||||
*/
|
||||
@Test void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
@Test
|
||||
void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
// Setup
|
||||
final String key = "testKey";
|
||||
final String value = "testValue";
|
||||
@@ -49,7 +50,8 @@ class DdiMetadataTest {
|
||||
/**
|
||||
* Verify the correct deserialization of a model with a additional unknown property
|
||||
*/
|
||||
@Test void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
@Test
|
||||
void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
// Setup
|
||||
final String serializedDdiMetadata = "{\"key\":\"testKey\",\"value\":\"testValue\",\"unknownProperty\":\"test\"}";
|
||||
|
||||
@@ -62,7 +64,8 @@ class DdiMetadataTest {
|
||||
/**
|
||||
* Verify that deserialization fails for known properties with a wrong datatype
|
||||
*/
|
||||
@Test void shouldFailForObjectWithWrongDataTypes() {
|
||||
@Test
|
||||
void shouldFailForObjectWithWrongDataTypes() {
|
||||
// Setup
|
||||
final String serializedDdiMetadata = "{\"key\":[\"testKey\"],\"value\":\"testValue\"}";
|
||||
|
||||
|
||||
@@ -32,7 +32,8 @@ class DdiPollingTest {
|
||||
/**
|
||||
* Verify the correct serialization and deserialization of the model
|
||||
*/
|
||||
@Test void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
@Test
|
||||
void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
// Setup
|
||||
final DdiPolling ddiPolling = new DdiPolling("10");
|
||||
|
||||
@@ -46,7 +47,8 @@ class DdiPollingTest {
|
||||
/**
|
||||
* Verify the correct deserialization of a model with a additional unknown property
|
||||
*/
|
||||
@Test void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
@Test
|
||||
void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
// Setup
|
||||
final String serializedDdiPolling = "{\"sleep\":\"10\",\"unknownProperty\":\"test\"}";
|
||||
|
||||
@@ -58,7 +60,8 @@ class DdiPollingTest {
|
||||
/**
|
||||
* Verify that deserialization fails for known properties with a wrong datatype
|
||||
*/
|
||||
@Test void shouldFailForObjectWithWrongDataTypes() {
|
||||
@Test
|
||||
void shouldFailForObjectWithWrongDataTypes() {
|
||||
// Setup
|
||||
final String serializedDdiPolling = "{\"sleep\":[\"10\"]}";
|
||||
|
||||
|
||||
@@ -32,7 +32,8 @@ class DdiProgressTest {
|
||||
/**
|
||||
* Verify the correct serialization and deserialization of the model
|
||||
*/
|
||||
@Test void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
@Test
|
||||
void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
// Setup
|
||||
final DdiProgress ddiProgress = new DdiProgress(30, 100);
|
||||
|
||||
@@ -47,7 +48,8 @@ class DdiProgressTest {
|
||||
/**
|
||||
* Verify the correct deserialization of a model with a additional unknown property
|
||||
*/
|
||||
@Test void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
@Test
|
||||
void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
// Setup
|
||||
final String serializedDdiProgress = "{\"cnt\":30,\"of\":100,\"unknownProperty\":\"test\"}";
|
||||
|
||||
@@ -60,7 +62,8 @@ class DdiProgressTest {
|
||||
/**
|
||||
* Verify that deserialization fails for known properties with a wrong datatype
|
||||
*/
|
||||
@Test void shouldFailForObjectWithWrongDataTypes() {
|
||||
@Test
|
||||
void shouldFailForObjectWithWrongDataTypes() {
|
||||
// Setup
|
||||
final String serializedDdiProgress = "{\"cnt\":[30],\"of\":100}";
|
||||
|
||||
|
||||
@@ -33,7 +33,8 @@ class DdiResultTest {
|
||||
/**
|
||||
* Verify the correct serialization and deserialization of the model
|
||||
*/
|
||||
@Test void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
@Test
|
||||
void shouldSerializeAndDeserializeObject() throws IOException {
|
||||
// Setup
|
||||
final DdiProgress ddiProgress = new DdiProgress(30, 100);
|
||||
final DdiResult ddiResult = new DdiResult(NONE, ddiProgress);
|
||||
@@ -50,7 +51,8 @@ class DdiResultTest {
|
||||
/**
|
||||
* Verify the correct deserialization of a model with a additional unknown property
|
||||
*/
|
||||
@Test void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
@Test
|
||||
void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
// Setup
|
||||
final String serializedDdiResult = "{\"finished\":\"none\",\"progress\":{\"cnt\":30,\"of\":100},\"unknownProperty\":\"test\"}";
|
||||
|
||||
@@ -64,7 +66,8 @@ class DdiResultTest {
|
||||
/**
|
||||
* Verify that deserialization fails for known properties with a wrong datatype
|
||||
*/
|
||||
@Test void shouldFailForObjectWithWrongDataTypes() {
|
||||
@Test
|
||||
void shouldFailForObjectWithWrongDataTypes() {
|
||||
// Setup
|
||||
final String serializedDdiResult = "{\"finished\":[\"none\"],\"progress\":{\"cnt\":30,\"of\":100}}";
|
||||
|
||||
|
||||
@@ -57,7 +57,8 @@ class DdiStatusTest {
|
||||
/**
|
||||
* Verify the correct deserialization of a model with a additional unknown property
|
||||
*/
|
||||
@Test void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
@Test
|
||||
void shouldDeserializeObjectWithUnknownProperty() throws IOException {
|
||||
// Setup
|
||||
final String serializedDdiStatus = "{\"execution\":\"proceeding\",\"result\":{\"finished\":\"none\"," +
|
||||
"\"progress\":{\"cnt\":30,\"of\":100}},\"details\":[],\"unknownProperty\":\"test\"}";
|
||||
@@ -74,7 +75,8 @@ class DdiStatusTest {
|
||||
/**
|
||||
* Verify the correct deserialization of a model with a provided code (optional)
|
||||
*/
|
||||
@Test void shouldDeserializeObjectWithOptionalCode() throws IOException {
|
||||
@Test
|
||||
void shouldDeserializeObjectWithOptionalCode() throws IOException {
|
||||
// Setup
|
||||
final String serializedDdiStatus = "{\"execution\":\"proceeding\",\"result\":{\"finished\":\"none\"," +
|
||||
"\"progress\":{\"cnt\":30,\"of\":100}},\"code\": 12,\"details\":[]}";
|
||||
@@ -91,7 +93,8 @@ class DdiStatusTest {
|
||||
/**
|
||||
* Verify that deserialization fails for known properties with a wrong datatype
|
||||
*/
|
||||
@Test void shouldFailForObjectWithWrongDataTypes() {
|
||||
@Test
|
||||
void shouldFailForObjectWithWrongDataTypes() {
|
||||
// Setup
|
||||
final String serializedDdiStatus = "{\"execution\":[\"proceeding\"],\"result\":{\"finished\":\"none\"," +
|
||||
"\"progress\":{\"cnt\":30,\"of\":100}},\"details\":[]}";
|
||||
|
||||
@@ -31,7 +31,8 @@ class JsonIgnorePropertiesAnnotationTest {
|
||||
/**
|
||||
* This test verifies that all model classes within the 'org.eclipse.hawkbit.ddi.json.model' package are annotated with '@JsonIgnoreProperties(ignoreUnknown = true)'
|
||||
*/
|
||||
@Test void shouldCheckAnnotationsForAllModelClasses() {
|
||||
@Test
|
||||
void shouldCheckAnnotationsForAllModelClasses() {
|
||||
final String packageName = getClass().getPackage().getName();
|
||||
try (final ScanResult scanResult = new ClassGraph().acceptPackages(packageName).scan()) {
|
||||
final List<? extends Class<?>> matchingClasses = scanResult.getAllClasses()
|
||||
|
||||
Reference in New Issue
Block a user