diff --git a/buisnesslogic/pom.xml b/buisnesslogic/pom.xml index 77e0dd0..52928ba 100644 --- a/buisnesslogic/pom.xml +++ b/buisnesslogic/pom.xml @@ -28,8 +28,17 @@ 4.11 test - - + + org.springframework.boot + spring-boot-starter-test + test + + + org.junit.vintage + junit-vintage-engine + + + javax.xml.bind jaxb-api diff --git a/buisnesslogic/src/test/java/com/plannaplan/configutils/ConfiguratorTest.java b/buisnesslogic/src/test/java/com/plannaplan/configutils/ConfiguratorTest.java new file mode 100644 index 0000000..446c2d8 --- /dev/null +++ b/buisnesslogic/src/test/java/com/plannaplan/configutils/ConfiguratorTest.java @@ -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); + + } +} \ No newline at end of file