The expiration time for new job artifacts in CI/CD pipelines is now 30 days (GitLab default). Previously generated artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 792b9095 authored by Daniel Lehmberg's avatar Daniel Lehmberg
Browse files

closes #262

parent 188ebf8e
Pipeline #146995 failed with stages
in 66 minutes and 3 seconds
......@@ -205,7 +205,7 @@ public class TextView extends JPanel implements IJsonView {
if (scenarioChecker != null){
scenarioChecker.checkScenario(currentScenario);
}
} catch (Exception e) {
} catch (IOException e) {
ScenarioPanel.setActiveJsonParsingErrorMsg(attributeType.name() + " tab:\n" + e.getMessage());
jsonValidIndicator.setInvalid();
}
......
......@@ -24,11 +24,11 @@ public class JsonConverter {
return deserializeScenarioRunManagerFromNode(StateJsonConverter.readTree(json));
}
public static ModelDefinition deserializeModelDefinition(String json) throws Exception {
public static ModelDefinition deserializeModelDefinition(String json) throws IOException {
JsonNode node = StateJsonConverter.readTree(json);
StateJsonConverter.checkForTextOutOfNode(json);
if (!node.has(StateJsonConverter.MAIN_MODEL_KEY))
throw new Exception("No " + StateJsonConverter.MAIN_MODEL_KEY + "-entry was found.");
throw new IOException("No " + StateJsonConverter.MAIN_MODEL_KEY + "-entry was found.");
String mainModelString = null;
JsonNode mainModel = node.get(StateJsonConverter.MAIN_MODEL_KEY);
if (!mainModel.isNull()) { // avoid test-instantiating when mainModel isn't set, otherwise user has invalid json when creating a new scenario
......@@ -81,8 +81,7 @@ public class JsonConverter {
return StateJsonConverter.writeValueAsString(serializeScenarioRunManagerToNode(scenarioRunManager, commitHashIncluded));
}
public static JsonNode serializeScenarioRunManagerToNode(Scenario scenarioRunManager,
boolean commitHashIncluded) throws IOException {
public static JsonNode serializeScenarioRunManagerToNode(Scenario scenarioRunManager, boolean commitHashIncluded) {
ScenarioStore scenarioStore = scenarioRunManager.getScenarioStore();
ObjectNode rootNode = StateJsonConverter.createObjectNode();
serializeMeta(rootNode, commitHashIncluded, scenarioStore);
......
......@@ -208,7 +208,7 @@ public class TrajectoryReader {
}
}
private Map<Step, List<Agent>> readStandardTrajectoryFile() throws IOException {
private Map<Step, List<Agent>> readStandardTrajectoryFile() throws IOException{
try (BufferedReader in = IOUtils.defaultBufferedReader(this.trajectoryFilePath)) {
return in.lines() // a stream of lines
.skip(1) // skip the first line i.e. the header
......@@ -286,7 +286,14 @@ public class TrajectoryReader {
}
if(stridesIndex != NOT_SET_COLUMN_INDEX_IDENTIFIER) {
FootStep[] footSteps = StateJsonConverter.deserializeObjectFromJson(rowTokens[stridesIndex], FootStep[].class);
FootStep[] footSteps;
try{
footSteps = StateJsonConverter.deserializeObjectFromJson(rowTokens[stridesIndex], FootStep[].class);
}catch(IOException e){
e.printStackTrace();
throw new RuntimeException("Could not deserialize foot steps.");
}
for(FootStep footStep : footSteps) {
ped.addFootStepToTrajectory(footStep);
}
......
......@@ -27,6 +27,7 @@ import org.vadere.util.geometry.shapes.VPoint;
import org.vadere.util.geometry.shapes.VRectangle;
import org.vadere.util.geometry.shapes.VShape;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
......@@ -77,7 +78,12 @@ public class GroupSourceControllerTest extends TestSourceControllerUsingConstant
public void initialize(SourceTestAttributesBuilder builder) {
SourceTestData d = new SourceTestData();
d.attributesSource = builder.getResult();
try{
d.attributesSource = builder.getResult();
} catch(IOException e){
throw new RuntimeException(e.getMessage());
}
d.attributesPedestrian = new AttributesAgent();
d.random = new Random(builder.getRandomSeed());
......@@ -524,7 +530,7 @@ public class GroupSourceControllerTest extends TestSourceControllerUsingConstant
@Test
public void testCentroid() {
public void testCentroid() throws IOException {
AttributesSource attributesSource =
StateJsonConverter.deserializeObjectFromJson(sourceJson, AttributesSource.class);
Source source = new Source(attributesSource);
......@@ -537,7 +543,7 @@ public class GroupSourceControllerTest extends TestSourceControllerUsingConstant
}
@Test
public void testSource() {
public void testSource() throws IOException {
AttributesSource attributesSource =
StateJsonConverter.deserializeObjectFromJson(sourceJson, AttributesSource.class);
......
......@@ -17,6 +17,7 @@ import org.vadere.util.geometry.shapes.VPoint;
import org.vadere.util.geometry.shapes.VRectangle;
import org.vadere.util.geometry.shapes.VShape;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Random;
......@@ -45,7 +46,7 @@ public class TestSourceControllerUsingConstantSpawnRate {
}
public void initialize(SourceTestAttributesBuilder builder) {
public void initialize(SourceTestAttributesBuilder builder) throws IOException{
SourceTestData d = new SourceTestData();
......@@ -97,7 +98,7 @@ public class TestSourceControllerUsingConstantSpawnRate {
* Test method for {@link org.vadere.simulator.control.SourceController#update(double)}.
*/
@Test
public void testUpdateEqualStartAndEndTime() {
public void testUpdateEqualStartAndEndTime() throws IOException {
SourceTestAttributesBuilder builder = new SourceTestAttributesBuilder()
.setOneTimeSpawn(0);
......@@ -114,7 +115,7 @@ public class TestSourceControllerUsingConstantSpawnRate {
* Test method for {@link org.vadere.simulator.control.SourceController#update(double)}.
*/
@Test
public void testUpdateEndTimeLarge() {
public void testUpdateEndTimeLarge() throws IOException {
double startTime = 0.0;
double endTime = 10.0;
......@@ -136,7 +137,7 @@ public class TestSourceControllerUsingConstantSpawnRate {
* Test method for {@link org.vadere.simulator.control.SourceController#update(double)}.
*/
@Test
public void testUpdateSpawnDelayThreeTimes() {
public void testUpdateSpawnDelayThreeTimes() throws IOException {
double endTime = 10.0;
SourceTestAttributesBuilder builder = new SourceTestAttributesBuilder()
......@@ -155,7 +156,7 @@ public class TestSourceControllerUsingConstantSpawnRate {
* Test method for {@link org.vadere.simulator.control.SourceController#update(double)}.
*/
@Test
public void testUpdateSmallSpawnDelay() {
public void testUpdateSmallSpawnDelay() throws IOException {
double endTime = 1.0;
SourceTestAttributesBuilder builder = new SourceTestAttributesBuilder()
......@@ -174,7 +175,7 @@ public class TestSourceControllerUsingConstantSpawnRate {
* Test method for {@link org.vadere.simulator.control.SourceController#update(double)}.
*/
@Test
public void testUpdateUseFreeSpaceOnly() {
public void testUpdateUseFreeSpaceOnly() throws IOException {
AttributesAgent attributesAgent = new AttributesAgent();
SourceTestAttributesBuilder builder = new SourceTestAttributesBuilder()
......
......@@ -10,6 +10,7 @@ import org.vadere.state.scenario.Pedestrian;
import org.vadere.util.geometry.shapes.VRectangle;
import org.vadere.util.geometry.shapes.VShape;
import java.io.IOException;
import java.util.Collection;
import static org.junit.Assert.assertEquals;
......@@ -29,7 +30,12 @@ public class TestSourceControllerUsingDistributions extends TestSourceController
public void testStartTime() {
SourceTestAttributesBuilder builder = new SourceTestAttributesBuilder()
.setDistributionClass(ConstantTestDistribution.class);
initialize(builder);
try{
initialize(builder);
}catch (IOException e){
throw new RuntimeException(e.getMessage());
}
first().sourceController.update(0);
pedestrianCountEquals(0);
......@@ -41,7 +47,7 @@ public class TestSourceControllerUsingDistributions extends TestSourceController
}
@Test
public void testEndTime() {
public void testEndTime() throws IOException {
SourceTestAttributesBuilder builder = new SourceTestAttributesBuilder();
initialize(builder);
......@@ -55,7 +61,7 @@ public class TestSourceControllerUsingDistributions extends TestSourceController
}
@Test
public void testOneTimeSpawn() {
public void testOneTimeSpawn() throws IOException {
SourceTestAttributesBuilder builder = new SourceTestAttributesBuilder()
.setOneTimeSpawn(1);
initialize(builder);
......@@ -69,7 +75,7 @@ public class TestSourceControllerUsingDistributions extends TestSourceController
}
@Test
public void testSpawnNumber() {
public void testSpawnNumber() throws IOException{
SourceTestAttributesBuilder builder = new SourceTestAttributesBuilder()
.setSpawnNumber(10);
initialize(builder);
......@@ -81,7 +87,7 @@ public class TestSourceControllerUsingDistributions extends TestSourceController
}
@Test
public void testSpawnRateGreaterThanUpdateRate() {
public void testSpawnRateGreaterThanUpdateRate() throws IOException {
SourceTestAttributesBuilder builder = new SourceTestAttributesBuilder()
.setStartTime(0).setEndTime(1)
.setSpawnIntervalForConstantDistribution(0.3);
......@@ -96,7 +102,7 @@ public class TestSourceControllerUsingDistributions extends TestSourceController
}
@Test
public void testUseFreeSpaceOnly() {
public void testUseFreeSpaceOnly() throws IOException {
// expected: not stop spawning before all pedestrians are created (even after end time)
double startTime = 0;
double endTime = 1;
......@@ -121,7 +127,7 @@ public class TestSourceControllerUsingDistributions extends TestSourceController
}
@Test
public void testUseFreeSpaceOnlyWithSingleSpawnEvent() {
public void testUseFreeSpaceOnlyWithSingleSpawnEvent() throws IOException {
// works also with sources that have startTime == endTime?
// expected: not stop spawning before all pedestrians are created (even after end time)
double startTime = 1;
......@@ -148,7 +154,7 @@ public class TestSourceControllerUsingDistributions extends TestSourceController
}
@Test
public void testMaxSpawnNumberTotalSetTo0() {
public void testMaxSpawnNumberTotalSetTo0() throws IOException {
SourceTestAttributesBuilder builder = new SourceTestAttributesBuilder()
.setMaxSpawnNumberTotal(0); // <-- max 0 -> spawn no peds at all
initialize(builder);
......@@ -161,7 +167,7 @@ public class TestSourceControllerUsingDistributions extends TestSourceController
}
@Test
public void testMaxSpawnNumberTotalNotSet() {
public void testMaxSpawnNumberTotalNotSet() throws IOException {
SourceTestAttributesBuilder builder = new SourceTestAttributesBuilder()
.setMaxSpawnNumberTotal(AttributesSource.NO_MAX_SPAWN_NUMBER_TOTAL); // <-- maximum not set
initialize(builder);
......@@ -174,7 +180,7 @@ public class TestSourceControllerUsingDistributions extends TestSourceController
}
@Test
public void testMaxSpawnNumberTotalWithSmallEndTime() {
public void testMaxSpawnNumberTotalWithSmallEndTime() throws IOException {
SourceTestAttributesBuilder builder = new SourceTestAttributesBuilder()
.setMaxSpawnNumberTotal(4); // <-- not exhausted
initialize(builder);
......@@ -187,7 +193,7 @@ public class TestSourceControllerUsingDistributions extends TestSourceController
}
@Test
public void testMaxSpawnNumberTotalWithLargeEndTime() {
public void testMaxSpawnNumberTotalWithLargeEndTime() throws IOException {
double endTime = 100;
int maxSpawnNumberTotal = 4;
SourceTestAttributesBuilder builder = new SourceTestAttributesBuilder()
......@@ -201,7 +207,7 @@ public class TestSourceControllerUsingDistributions extends TestSourceController
}
@Test
public void testMaxSpawnNumberTotalWithLargeEndTimeAndSpawnNumberGreater1() {
public void testMaxSpawnNumberTotalWithLargeEndTimeAndSpawnNumberGreater1() throws IOException {
int maxSpawnNumberTotal = 4; // <-- exhausted!
SourceTestAttributesBuilder builder = new SourceTestAttributesBuilder()
.setEndTime(100)
......@@ -219,7 +225,7 @@ public class TestSourceControllerUsingDistributions extends TestSourceController
* source and not within its bound and that no overlap occurs.
*/
@Test
public void testPolygonShapedSourceNoRandom() {
public void testPolygonShapedSourceNoRandom() throws IOException {
int maxSpawnNumberTotal = 5;
SourceTestAttributesBuilder builder = new SourceTestAttributesBuilder()
.setEndTime(100)
......@@ -253,7 +259,7 @@ public class TestSourceControllerUsingDistributions extends TestSourceController
* source and not within its bound and that no overlap occurs.
*/
@Test
public void testPolygonShapedSourceWithRandom() {
public void testPolygonShapedSourceWithRandom() throws IOException {
int maxSpawnNumberTotal = 5;
SourceTestAttributesBuilder builder = new SourceTestAttributesBuilder()
.setEndTime(100)
......
......@@ -11,7 +11,6 @@ import org.vadere.state.attributes.models.AttributesPotentialCompact;
import org.vadere.state.attributes.scenario.AttributesAgent;
import org.vadere.state.scenario.Topography;
import org.vadere.state.util.StateJsonConverter;
import org.vadere.state.util.TextOutOfNodeException;
import org.vadere.util.geometry.shapes.VPoint;
import org.vadere.util.geometry.shapes.VRectangle;
import org.vadere.util.logging.Logger;
......@@ -146,7 +145,7 @@ public class TestCLOptimalStepsModel {
*/
@Ignore
@Before
public void setUp() throws IOException, TextOutOfNodeException {
public void setUp() throws IOException {
random = new Random();
maxStepSize = 0.2f;
numberOfElements = 256;
......
......@@ -13,7 +13,6 @@ import org.vadere.state.scenario.Et423Geometry;
import org.vadere.state.scenario.Topography;
import org.vadere.state.scenario.TrainGeometry;
import org.vadere.state.util.StateJsonConverter;
import org.vadere.state.util.TextOutOfNodeException;
public class TestTopographyAndModelBuilder {
......@@ -57,7 +56,7 @@ public class TestTopographyAndModelBuilder {
@SuppressWarnings("resource")
final String json = new Scanner(TestTopographyAndModelBuilder.class.getResourceAsStream(TEST_TRAIN_TOPOGRAPHY_RESOURCE), "UTF-8").useDelimiter("\\A").next();
return StateJsonConverter.deserializeTopography(json);
} catch (IOException | TextOutOfNodeException e) {
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException(e);
}
......
......@@ -8,6 +8,7 @@ import org.vadere.util.geometry.shapes.VRectangle;
import org.vadere.util.geometry.shapes.VShape;
import java.awt.geom.Path2D;
import java.io.IOException;
import java.util.Arrays;
public class SourceTestAttributesBuilder {
......@@ -33,7 +34,7 @@ public class SourceTestAttributesBuilder {
private double y3 = 5.0;
private long randomSeed = 0;
public AttributesSource getResult() {
public AttributesSource getResult() throws IOException {
String json = generateSourceAttributesJson();
return StateJsonConverter.deserializeObjectFromJson(json, AttributesSource.class);
}
......
......@@ -3,6 +3,7 @@ package org.vadere.state.util;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectWriter;
......@@ -79,16 +80,10 @@ public abstract class StateJsonConverter {
return prettyWriter;
}
// TODO handle exception
public static <T> T deserializeObjectFromJson(String json, Class<T> objectClass) {
try {
final JsonNode node = mapper.readTree(json);
checkForTextOutOfNode(json);
return mapper.treeToValue(node, objectClass);
} catch (TextOutOfNodeException | IOException e) {
throw new RuntimeException(e);
}
public static <T> T deserializeObjectFromJson(String json, Class<T> objectClass) throws IOException {
final JsonNode node = mapper.readTree(json);
checkForTextOutOfNode(json);
return mapper.treeToValue(node, objectClass);
}
public static <T> T deserializeObjectFromJson(String json, final TypeReference<T> type) {
......@@ -135,7 +130,7 @@ public abstract class StateJsonConverter {
AttributesTeleporter teleporter = null;
}
public static AttributesSimulation deserializeAttributesSimulation(String json) {
public static AttributesSimulation deserializeAttributesSimulation(String json) throws IOException {
return deserializeObjectFromJson(json, AttributesSimulation.class);
}
......@@ -158,7 +153,7 @@ public abstract class StateJsonConverter {
return attributesList;
}
public static Topography deserializeTopography(String json) throws IOException, TextOutOfNodeException {
public static Topography deserializeTopography(String json) throws IOException {
checkForTextOutOfNode(json);
return deserializeTopographyFromNode(mapper.readTree(json));
}
......@@ -178,7 +173,8 @@ public abstract class StateJsonConverter {
return topography;
}
public static void checkForTextOutOfNode(String json) throws TextOutOfNodeException, IOException { // via stackoverflow.com/a/26026359
public static void checkForTextOutOfNode(String json) throws IOException {
// via stackoverflow.com/a/26026359
JsonParser jp = mapper.getFactory().createParser(json);
mapper.readValue(jp, JsonNode.class);
try {
......
package org.vadere.state.util;
public class TextOutOfNodeException extends Exception {
import java.io.IOException;
public class TextOutOfNodeException extends IOException {
// is an exception to used this case: stackoverflow.com/a/26026359
public TextOutOfNodeException() {
super("Text outside of the JSON Node can't be parsed.");
}
......
......@@ -7,6 +7,8 @@ import org.junit.Test;
import org.vadere.state.attributes.scenario.AttributesAgent;
import org.vadere.state.util.StateJsonConverter;
import java.io.IOException;
public class TestAttributesInitialization {
private static final double delta = 1e-8;
......@@ -24,14 +26,14 @@ public class TestAttributesInitialization {
/**
* Test method for
* {@link org.vadere.state.attributes.models.AttributesODEIntegrator#AttributesODEModel(java.util.Map)}
* {@link org.vadere.state.attributes.models.AttributesODEIntegrator(java.util.Map)}
* . Asserts the attributes are initialized correctly.
*
* @throws IllegalAccessException
* @throws IllegalArgumentException
*/
@Test
public void testInit() throws IllegalArgumentException, IllegalAccessException {
public void testInit() throws IllegalArgumentException, IOException {
// correct case
attributesPedestrian = StateJsonConverter.deserializeObjectFromJson(store, AttributesAgent.class);
......@@ -41,14 +43,14 @@ public class TestAttributesInitialization {
/**
* Test method for
* {@link org.vadere.state.attributes.models.AttributesODEIntegrator#AttributesODEModel(java.util.Map)}
* {@link org.vadere.state.attributes.models.AttributesODEIntegrator(java.util.Map)}
* . Asserts the default attributes are initialized correctly.
*
* @throws IllegalAccessException
* @throws IllegalArgumentException
*/
@Test
public void testInitDefault() throws IllegalArgumentException, IllegalAccessException {
public void testInitDefault() throws IllegalArgumentException, IOException {
// correct case
store = "{}";
attributesPedestrian = StateJsonConverter.deserializeObjectFromJson(store, AttributesAgent.class);
......
......@@ -9,6 +9,8 @@ import org.vadere.state.attributes.models.AttributesODEIntegrator;
import org.vadere.state.types.IntegratorType;
import org.vadere.state.util.StateJsonConverter;
import java.io.IOException;
public class TestAttributesODEModel {
private static final double delta = 1e-8;
......@@ -21,22 +23,20 @@ public class TestAttributesODEModel {
@Before
public void setUp() {
store = "{" + "\"solverType\" : \"CLASSICAL_RK4\","
+ "\"toleranceAbsolute\" : " + new Double(1e-5).toString() + "," + "\"toleranceRelative\" : "
+ new Double(1e-5).toString() + "," + "\"stepSizeMin\" : " + new Double(1e-5).toString() + ","
+ "\"stepSizeMax\" : " + new Double(1e-5).toString() + "}";
+ "\"toleranceAbsolute\" : " + Double.toString(1e-5) + "," + "\"toleranceRelative\" : "
+ Double.toString(1e-5) + "," + "\"stepSizeMin\" : " + Double.toString(1e-5) + ","
+ "\"stepSizeMax\" : " + Double.toString(1e-5) + "}";
}
/**
* Test method for
* {@link org.vadere.state.attributes.models.AttributesODEIntegrator#AttributesODEModel(java.util.Map)}
* {@link org.vadere.state.attributes.models.AttributesODEIntegrator(java.util.Map)}
* . Asserts that creating an {@link AttributesODEIntegrator} with the given
* store sets the correct instance variables.
*
* @throws IllegalAccessException
* @throws IllegalArgumentException
*/
@Test
public void testAttributesODEModel() throws IllegalArgumentException, IllegalAccessException {
public void testAttributesODEModel() throws IllegalArgumentException, IOException {
// correct case
attributesODEModel = StateJsonConverter.deserializeObjectFromJson(store, AttributesODEIntegrator.class);
assertArrayEquals(new double[] {1e-5}, new double[] {attributesODEModel.getToleranceAbsolute()}, delta);
......
......@@ -5,7 +5,7 @@ import static org.junit.Assert.*;
import org.junit.Test;
import org.vadere.state.util.StateJsonConverter;
import com.fasterxml.jackson.databind.JsonMappingException;
import java.io.IOException;
public class TestPojoJsonDeserialization {
......@@ -13,21 +13,21 @@ public class TestPojoJsonDeserialization {
private static final String completeJson = "{\"a\":4,\"b\":5}";
@Test
public void testEmptyDeserializationWithImplicitDefaultCtor() {
public void testEmptyDeserializationWithImplicitDefaultCtor() throws IOException {
// Important: After deserialization with incomplete JSON,
// the init values (for a and b) in POJOs take effect!
assertTestPojoEquals(new TestPojoWithImplicitDefaultConstructor(), "{}", TestPojoWithImplicitDefaultConstructor.class);
}
@Test
public void testIncompleteDeserialization() {
public void testIncompleteDeserialization() throws IOException{
// Important: After deserialization with incomplete JSON,
// the init values (for a and b) in POJOs take effect!
assertTestPojoEquals(new TestPojoWithDefaultConstructor(1, 5), incompleteJson, TestPojoWithDefaultConstructor.class);
}
@Test
public void testCompleteDeserialization() {
public void testCompleteDeserialization() throws IOException {
assertTestPojoEquals(new TestPojoWithDefaultConstructor(4, 5), completeJson, TestPojoWithDefaultConstructor.class);
}
......@@ -35,8 +35,8 @@ public class TestPojoJsonDeserialization {
public void testIncompleteDeserializationWithoutDefaultCtor() {
try {
assertTestPojoEquals(new TestPojoWithoutDefaultConstructor(0, 5), incompleteJson, TestPojoWithoutDefaultConstructor.class);
} catch (RuntimeException e) {
assertExceptionCorrect(e);
} catch (IOException e) {
//Test successful
}
}
......@@ -44,16 +44,12 @@ public class TestPojoJsonDeserialization {
public void testCompleteDeserializationWithoutDefaultCtor() {
try {
assertTestPojoEquals(new TestPojoWithoutDefaultConstructor(0, 5), completeJson, TestPojoWithoutDefaultConstructor.class);
} catch (RuntimeException e) {
assertExceptionCorrect(e);
} catch (IOException e) {
//Test successful
}
}
private void assertExceptionCorrect(RuntimeException e) {
assertTrue(e.getCause() instanceof JsonMappingException);
}
private void assertTestPojoEquals(Object pojo, String json, Class<?> clazz) {
private void assertTestPojoEquals(Object pojo, String json, Class<?> clazz) throws IOException {
assertEquals(pojo, StateJsonConverter.deserializeObjectFromJson(json, clazz));
}
......
......@@ -2,6 +2,7 @@ package org.vadere.state.attributes.scenario;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
......@@ -12,18 +13,18 @@ public class TestAttributesSource {
private AttributesSource attributes;
private void createAttributes(SourceTestAttributesBuilder builder) {
private void createAttributes(SourceTestAttributesBuilder builder) throws IOException {
attributes = builder.getResult();
}
@Test
public void testGetInterSpawnTimeDistribution() {
public void testGetInterSpawnTimeDistribution() throws IOException {
createAttributes(new SourceTestAttri