Merge remote-tracking branch 'remotes/origin/story30_XMLs' into splitIntoTwoModules

This commit is contained in:
cbt24
2017-04-25 15:56:44 +12:00
4 changed files with 118 additions and 56 deletions
@@ -3,12 +3,11 @@ package seng302.Mock;
import org.junit.Before;
import org.junit.Test;
import seng302.GPSCoordinate;
import seng302.Model.Leg;
import java.util.List;
import java.util.Map;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
/**
@@ -26,6 +25,8 @@ public class StreamedRaceTest {
} catch (Exception e) {
e.printStackTrace();
//fail("Cannot find mockXML/raceXML/raceTest.xml in the resources folder");
} catch (StreamedCourseXMLException e) {
e.printStackTrace();
}
}
@@ -59,9 +60,19 @@ public class StreamedRaceTest {
}
@Test
public void testParticipants() {
Map<Integer, StreamedBoat> participants = streamedCourseXMLReader.getParticipants();
assertTrue(participants.containsKey(107));
assertTrue(participants.containsKey(108));
public void testRaceSettings() {
}
@Test
public void correctLegSequence() {
List<Leg> legs = streamedCourseXMLReader.getLegs();
String[] expectedNames = {
"StartLine",
"M1",
"M2",
"Gate"
};
for(int i = 0; i < legs.size(); i++) assertEquals(expectedNames[i], legs.get(i).getName());
}
}