Added ConfiguratorTest.java. Updated pom.xml
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
parent
b65c56078b
commit
9ea2912e98
@ -28,8 +28,17 @@
|
|||||||
<version>4.11</version>
|
<version>4.11</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.junit.vintage</groupId>
|
||||||
|
<artifactId>junit-vintage-engine</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.xml.bind</groupId>
|
<groupId>javax.xml.bind</groupId>
|
||||||
<artifactId>jaxb-api</artifactId>
|
<artifactId>jaxb-api</artifactId>
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.plannaplan.configutils;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
||||||
|
import org.springframework.boot.test.web.client.TestRestTemplate;
|
||||||
|
import org.springframework.boot.web.server.LocalServerPort;
|
||||||
|
|
||||||
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
|
|
||||||
|
import com.plannaplan.Configurator;
|
||||||
|
import com.plannaplan.models.ConfigData;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@SpringBootTest
|
||||||
|
public class ConfiguratorTest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private Configurator restTemplate;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void greetingShouldReturnDefaultMessage() throws Exception {
|
||||||
|
InputStream inputStream = getClass().getClassLoader().getResourceAsStream("Zajecia.xlsx");
|
||||||
|
ConfigData data = new ConfigData(null,null,inputStream);
|
||||||
|
this.restTemplate.config(data);
|
||||||
|
assertTrue(true);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user