Work in progress.
This commit is contained in:
24
test/net/woodyfolsom/cs6601/p2/SurveyReaderTest.java
Normal file
24
test/net/woodyfolsom/cs6601/p2/SurveyReaderTest.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package net.woodyfolsom.cs6601.p2;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.hamcrest.core.IsEqual.equalTo;
|
||||
import static org.hamcrest.core.Is.*;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class SurveyReaderTest {
|
||||
|
||||
@Test
|
||||
public void testReadSurveyDataset() {
|
||||
Survey survey = SurveyReader.readSurvey(new File("data/survey.xml"));
|
||||
assertNotNull(survey);
|
||||
|
||||
assertThat(survey.getDinerCount(), equalTo(5));
|
||||
|
||||
Diner diner = survey.getDiner(0);
|
||||
assertThat(diner.isAllergic(0), is(false));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user