<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>single-feature-parent</artifactId>
<version>1.5.2-SNAPSHOT</version>
- <relativePath/>
+ <relativePath />
</parent>
<groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
<version>0.7.1-SNAPSHOT</version>
<packaging>feature</packaging>
- <name>ccsdk-features-sdnr-wt :: ${project.artifactId} :: feature</name>
+ <name>ccsdk-features :: ${project.artifactId} :: feature</name>
<dependencyManagement>
<dependencies>
<version>0.7.1-SNAPSHOT</version>
<packaging>pom</packaging>
- <name>ccsdk-features-sdnr-wt :: ${project.artifactId}</name>
+ <name>ccsdk-features :: ${project.artifactId}</name>
<properties>
<application.name>sdnr-wt-mountpoint-registrar</application.name>
<version>0.7.1-SNAPSHOT</version>
<packaging>bundle</packaging>
- <name>ccsdk-features-sdnr-wt :: ${project.artifactId}</name>
+ <name>ccsdk-features :: ${project.artifactId}</name>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<version>0.7.1-SNAPSHOT</version>
<packaging>pom</packaging>
- <name>ccsdk-features-sdnr-wt :: ${project.artifactId}</name>
+ <name>ccsdk-features :: ${project.artifactId}</name>
<modules>
<module>model</module>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>binding-parent</artifactId>
<version>1.5.2-SNAPSHOT</version>
- <relativePath/>
+ <relativePath />
</parent>
<groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
<version>0.7.1-SNAPSHOT</version>
<packaging>bundle</packaging>
- <name>ccsdk-features-sdnr-wt :: ${project.artifactId}</name>
+ <name>ccsdk-features :: ${project.artifactId}</name>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<maven.javadoc.skip>true</maven.javadoc.skip>
<maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
<buildtime>${maven.build.timestamp} UTC</buildtime>
- <elasticsearch.version>6.4.3</elasticsearch.version>
</properties>
<dependencies>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
- <artifactId>sdnr-wt-data-provider-database</artifactId>
- <version>${project.version}</version>
- <scope>provided</scope>
- </dependency>
</dependencies>
<build>
import java.io.IOException;
import java.nio.charset.StandardCharsets;
+import org.junit.After;
import org.junit.Test;
import org.onap.ccsdk.features.sdnr.wt.common.configuration.ConfigurationFileRepresentation;
import org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.PNFRegistrationConfig;
}
}
+
+ @After
+ public void cleanUp() {
+ File file = new File("test.properties");
+ if (file.exists()) {
+ System.out.println("File exists, Deleting it");
+ file.delete();
+ }
+
+ }
}
Map<String, Configuration> configMap = new HashMap<String, Configuration>();
DMaaPVESMsgConsumerMain dmaapMain;
-// @Before
+ // @Before
public void preTest1() {
try {
- Files.asCharSink(new File(CONFIGURATIONFILE), StandardCharsets.UTF_8).write(TESTCONFIG_GENERAL);
- ConfigurationFileRepresentation configFileRepresentation = new ConfigurationFileRepresentation(CONFIGURATIONFILE);
+ Files.asCharSink(new File(CONFIGURATIONFILE), StandardCharsets.UTF_8).write(TESTCONFIG_GENERAL);
+ ConfigurationFileRepresentation configFileRepresentation = new ConfigurationFileRepresentation(CONFIGURATIONFILE);
- generalConfig = new GeneralConfig(configFileRepresentation);
- PNFRegistrationConfig pnfRegConfig = new PNFRegistrationConfig(configFileRepresentation);
- FaultConfig faultConfig = new FaultConfig(configFileRepresentation);
+ generalConfig = new GeneralConfig(configFileRepresentation);
+ PNFRegistrationConfig pnfRegConfig = new PNFRegistrationConfig(configFileRepresentation);
+ FaultConfig faultConfig = new FaultConfig(configFileRepresentation);
- configMap.put("pnfRegistration", pnfRegConfig);
- configMap.put("fault", faultConfig);
+ configMap.put("pnfRegistration", pnfRegConfig);
+ configMap.put("fault", faultConfig);
} catch (Exception e) {
System.out.println("Failed in preTest execution "+e.getMessage());
}
public void preTest2() {
try {
- Files.asCharSink(new File(CONFIGURATIONFILE), StandardCharsets.UTF_8).write(TESTCONFIG_GENERAL_INVALID);
- ConfigurationFileRepresentation configFileRepresentation = new ConfigurationFileRepresentation(CONFIGURATIONFILE);
+ Files.asCharSink(new File(CONFIGURATIONFILE), StandardCharsets.UTF_8).write(TESTCONFIG_GENERAL_INVALID);
+ ConfigurationFileRepresentation configFileRepresentation = new ConfigurationFileRepresentation(CONFIGURATIONFILE);
- generalConfig = new GeneralConfig(configFileRepresentation);
- PNFRegistrationConfig pnfRegConfig = new PNFRegistrationConfig(configFileRepresentation);
- FaultConfig faultConfig = new FaultConfig(configFileRepresentation);
+ generalConfig = new GeneralConfig(configFileRepresentation);
+ PNFRegistrationConfig pnfRegConfig = new PNFRegistrationConfig(configFileRepresentation);
+ FaultConfig faultConfig = new FaultConfig(configFileRepresentation);
- configMap.put("pnfRegistration", pnfRegConfig);
- configMap.put("fault", faultConfig);
+ configMap.put("pnfRegistration", pnfRegConfig);
+ configMap.put("fault", faultConfig);
} catch (Exception e) {
System.out.println("Failed in preTest execution "+e.getMessage());
}
assertNotNull(configMap);
dmaapMain = new DMaaPVESMsgConsumerMain(configMap);
}
-
+
@Test
public void testDMaaPVESMsgConsumerMainMapOfStringConfiguration1() {
preTest2();
@After
public void postTest() {
+ File file = new File("test.properties");
+ if (file.exists()) {
+ System.out.println("File exists, Deleting it");
+ file.delete();
+ }
List<DMaaPVESMsgConsumer> consumers = DMaaPVESMsgConsumerMain.getConsumers();
for (DMaaPVESMsgConsumer consumer : consumers) {
// stop all consumers
consumer.stopConsumer();
}
}
-
}
+
+
import java.io.IOException;
import java.nio.charset.StandardCharsets;
+import org.junit.After;
import org.junit.Test;
import org.onap.ccsdk.features.sdnr.wt.common.configuration.ConfigurationFileRepresentation;
import org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.FaultConfig;
// TODO Auto-generated catch block
}
}
+
+ @After
+ public void cleanUp() {
+ File file = new File("test.properties");
+ if (file.exists()) {
+ System.out.println("File exists, Deleting it");
+ file.delete();
+ }
+
+ }
}
package org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test;
import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.Optional;
import org.junit.Test;
-import org.onap.ccsdk.features.sdnr.wt.yangtools.YangToolsMapper;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.SeverityType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.devicemanager.rev190109.PushFaultNotificationInputBuilder;
public class TestMapping {
- private final YangToolsMapper mapper = new YangToolsMapper();
+ private final ObjectMapper mapper = new ObjectMapper();
private static Optional<SeverityType> getSeverity(String faultSeverity) {
Thread.sleep(millis);
} catch (InterruptedException e) {
LOG.warn(e.getMessage());
- Thread.interrupted();
+ Thread.currentThread().interrupt();
}
}