Commit 2f339762 by natalya

fix pom

parent c9e7e956
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.6</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>
<powermock.version>1.6.5</powermock.version> <powermock.version>1.6.5</powermock.version>
</properties> </properties>
...@@ -54,6 +54,42 @@ ...@@ -54,6 +54,42 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>kz.arta.ext.jdm.MainClass</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>
<manifest>
<mainClass>kz.arta.ext.jdm.MainClass</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
</project> </project>
\ No newline at end of file
package kz.arta.ext.jdm.config; package kz.arta.ext.jdm.config;
import kz.arta.ext.jdm.config.model.Deployments; import kz.arta.ext.jdm.after.DeploymentsList;
import org.powermock.api.mockito.PowerMockito; import org.powermock.api.mockito.PowerMockito;
import org.powermock.reflect.Whitebox; import org.powermock.reflect.Whitebox;
...@@ -17,8 +17,8 @@ public class ConfigTest { ...@@ -17,8 +17,8 @@ public class ConfigTest {
Config config = PowerMockito.mock(Config.class); Config config = PowerMockito.mock(Config.class);
Whitebox.setInternalState(config, "filePath", ConfigTest.class.getResource("/kz/arta/jdm/config/config.xml").getFile()); Whitebox.setInternalState(config, "filePath", ConfigTest.class.getResource("/kz/arta/jdm/config/config.xml").getFile());
Whitebox.invokeMethod(config, "readConfig"); Whitebox.invokeMethod(config, "readConfig");
Deployments deployments = Whitebox.getInternalState(config, "deployments"); DeploymentsList deploymentsList = Whitebox.getInternalState(config, "deploymentsList");
Assert.assertEquals(deployments.getDeployments().size(), 2); Assert.assertEquals(deploymentsList.getAllList().size(), 2);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment