Inny error, zmiana lokalizacji pliku

Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
Marcin Woźniak 2020-09-03 16:59:27 +02:00
parent 9ea2912e98
commit f6d4674ec8

View File

@ -1,21 +1,22 @@
package com.plannaplan.configutils; package com.plannaplan;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.test.context.junit4.SpringRunner;
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.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import java.io.InputStream; import java.io.InputStream;
import com.plannaplan.App;
import com.plannaplan.Configurator; import com.plannaplan.Configurator;
import com.plannaplan.models.ConfigData; import com.plannaplan.models.ConfigData;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(SpringRunner.class)
@SpringBootTest @SpringBootTest
public class ConfiguratorTest { public class ConfiguratorTest {
@ -24,8 +25,8 @@ public class ConfiguratorTest {
@Test @Test
public void greetingShouldReturnDefaultMessage() throws Exception { public void greetingShouldReturnDefaultMessage() throws Exception {
InputStream inputStream = getClass().getClassLoader().getResourceAsStream("Zajecia.xlsx"); final InputStream inputStream = getClass().getClassLoader().getResourceAsStream("Zajecia.xlsx");
ConfigData data = new ConfigData(null,null,inputStream); final ConfigData data = new ConfigData(null, null, inputStream);
this.restTemplate.config(data); this.restTemplate.config(data);
assertTrue(true); assertTrue(true);