Loading pom.xml +9 −17 Original line number Diff line number Diff line Loading @@ -96,11 +96,6 @@ <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>org.flowable</groupId> <artifactId>flowable-spring-boot-starter</artifactId> Loading @@ -114,8 +109,6 @@ </dependency> <!-- activeMQ --> <dependency> <groupId>org.springframework.boot</groupId> Loading @@ -137,6 +130,7 @@ <artifactId>pooled-jms</artifactId> </dependency> <!-- Camel --> <dependency> <groupId>org.apache.camel.springboot</groupId> Loading Loading @@ -174,16 +168,13 @@ <artifactId>camel-stream</artifactId> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> </dependency> <!-- security --> <!-- security --> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-web</artifactId> Loading Loading @@ -225,9 +216,6 @@ <!-- database --> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> Loading @@ -254,8 +242,6 @@ <!-- Testing --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> Loading Loading @@ -288,7 +274,6 @@ <scope>test</scope> </dependency> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-broker</artifactId> Loading @@ -296,6 +281,13 @@ </dependency> <!--javax.jms --> <dependency> <groupId>javax.jms</groupId> <artifactId>javax.jms-api</artifactId> <version>2.0.1</version> </dependency> </dependencies> <build> Loading src/test/java/org/etsi/osl/oas/RulesIntegrationTest.java +3 −18 Original line number Diff line number Diff line Loading @@ -30,11 +30,8 @@ import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; import org.apache.commons.io.IOUtils; import org.etsi.osl.oas.AlarmHandling; import org.etsi.osl.oas.OasSpingBoot; import org.etsi.osl.oas.model.Action; import org.etsi.osl.oas.model.ActionCharacteristic; import org.etsi.osl.oas.model.ActionParam; Loading Loading @@ -101,7 +98,7 @@ public class RulesIntegrationTest { @WithMockUser(username = "osadmin", roles = { "ADMIN", "USER" }) @Test public void testRuleCreateAndUpdate() throws UnsupportedEncodingException, IOException, Exception { public void testRuleCreateAndUpdate() throws Exception { ActionSpecificationCreate actionCreate = new ActionSpecificationCreate(); actionCreate.setName("scaleEqually"); Loading Loading @@ -211,7 +208,7 @@ public class RulesIntegrationTest { scope.setEntityUUID("UUIDREFTEST2"); rule.setScope(scope); responseRule = mvc mvc .perform(MockMvcRequestBuilders.post("/assuranceServicesManagement/v1/ruleSpecification") .with(SecurityMockMvcRequestPostProcessors.csrf()).contentType(MediaType.APPLICATION_JSON) .content(toJson(rule))) Loading @@ -229,7 +226,7 @@ public class RulesIntegrationTest { @WithMockUser(username = "osadmin", roles = { "ADMIN", "USER" }) @Test public void testRuleCreateFromFiles() throws UnsupportedEncodingException, IOException, Exception { public void testRuleCreateFromFiles() throws Exception { File faction = new File( "src/test/resources/testAction.json" ); InputStream in = new FileInputStream( faction ); Loading Loading @@ -422,22 +419,10 @@ public class RulesIntegrationTest { return mapper.writeValueAsBytes(object); } static String toJsonString(Object object) throws IOException { ObjectMapper mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); return mapper.writeValueAsString(object); } static <T> T toJsonObj(String content, Class<T> valueType) throws IOException { ObjectMapper mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); return mapper.readValue(content, valueType); } static <T> T toJsonObj(InputStream content, Class<T> valueType) throws IOException { ObjectMapper mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); return mapper.readValue(content, valueType); } } Loading
pom.xml +9 −17 Original line number Diff line number Diff line Loading @@ -96,11 +96,6 @@ <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>org.flowable</groupId> <artifactId>flowable-spring-boot-starter</artifactId> Loading @@ -114,8 +109,6 @@ </dependency> <!-- activeMQ --> <dependency> <groupId>org.springframework.boot</groupId> Loading @@ -137,6 +130,7 @@ <artifactId>pooled-jms</artifactId> </dependency> <!-- Camel --> <dependency> <groupId>org.apache.camel.springboot</groupId> Loading Loading @@ -174,16 +168,13 @@ <artifactId>camel-stream</artifactId> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> </dependency> <!-- security --> <!-- security --> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-web</artifactId> Loading Loading @@ -225,9 +216,6 @@ <!-- database --> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> Loading @@ -254,8 +242,6 @@ <!-- Testing --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> Loading Loading @@ -288,7 +274,6 @@ <scope>test</scope> </dependency> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-broker</artifactId> Loading @@ -296,6 +281,13 @@ </dependency> <!--javax.jms --> <dependency> <groupId>javax.jms</groupId> <artifactId>javax.jms-api</artifactId> <version>2.0.1</version> </dependency> </dependencies> <build> Loading
src/test/java/org/etsi/osl/oas/RulesIntegrationTest.java +3 −18 Original line number Diff line number Diff line Loading @@ -30,11 +30,8 @@ import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; import org.apache.commons.io.IOUtils; import org.etsi.osl.oas.AlarmHandling; import org.etsi.osl.oas.OasSpingBoot; import org.etsi.osl.oas.model.Action; import org.etsi.osl.oas.model.ActionCharacteristic; import org.etsi.osl.oas.model.ActionParam; Loading Loading @@ -101,7 +98,7 @@ public class RulesIntegrationTest { @WithMockUser(username = "osadmin", roles = { "ADMIN", "USER" }) @Test public void testRuleCreateAndUpdate() throws UnsupportedEncodingException, IOException, Exception { public void testRuleCreateAndUpdate() throws Exception { ActionSpecificationCreate actionCreate = new ActionSpecificationCreate(); actionCreate.setName("scaleEqually"); Loading Loading @@ -211,7 +208,7 @@ public class RulesIntegrationTest { scope.setEntityUUID("UUIDREFTEST2"); rule.setScope(scope); responseRule = mvc mvc .perform(MockMvcRequestBuilders.post("/assuranceServicesManagement/v1/ruleSpecification") .with(SecurityMockMvcRequestPostProcessors.csrf()).contentType(MediaType.APPLICATION_JSON) .content(toJson(rule))) Loading @@ -229,7 +226,7 @@ public class RulesIntegrationTest { @WithMockUser(username = "osadmin", roles = { "ADMIN", "USER" }) @Test public void testRuleCreateFromFiles() throws UnsupportedEncodingException, IOException, Exception { public void testRuleCreateFromFiles() throws Exception { File faction = new File( "src/test/resources/testAction.json" ); InputStream in = new FileInputStream( faction ); Loading Loading @@ -422,22 +419,10 @@ public class RulesIntegrationTest { return mapper.writeValueAsBytes(object); } static String toJsonString(Object object) throws IOException { ObjectMapper mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); return mapper.writeValueAsString(object); } static <T> T toJsonObj(String content, Class<T> valueType) throws IOException { ObjectMapper mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); return mapper.readValue(content, valueType); } static <T> T toJsonObj(InputStream content, Class<T> valueType) throws IOException { ObjectMapper mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); return mapper.readValue(content, valueType); } }