package urban.model;
import static org.junit.Assert.*;
import java.util.Collection;
import java.util.List;
import org.antlr.runtime.RecognitionException;
import org.junit.Test;
import urban.parser.UrbanParser;
public class ObservationTest {
@Test
public void testToString() throws RecognitionException {
assertEquals("%obs: 'Foo' A(f)\n", new Observation("Foo", getAgentList("A(f)")).toString());
}
private List<Agent> getAgentList(String string) throws RecognitionException {
return new UrbanParser(string).expression();
}
@Test
public void testGetSites() throws RecognitionException {
Collection<Site> sites = new Observation("Foo", getAgentList("A(f)")).getSites();
assertTrue(sites.contains(new Site("A","f",null,null)));
}
}