25 lines
578 B
Java
25 lines
578 B
Java
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));
|
|
}
|
|
}
|