use of org.franca.core.franca.FBroadcast in project joynr by bmwcarit.
the class BroadcastUtilTest method testFilterParameters.
@Test
public void testFilterParameters() throws Exception {
URL fixtureURL = BroadcastUtilTest.class.getResource("FilterParameters.fidl");
ModelLoader loader = new ModelLoader(fixtureURL.getPath());
Resource fixtureResource = loader.getResources().iterator().next();
BroadcastUtil broadcastUtil = Guice.createInjector().getInstance(BroadcastUtil.class);
FModel model = (FModel) fixtureResource.getContents().get(0);
FBroadcast fixture = model.getInterfaces().get(0).getBroadcasts().get(0);
ArrayList<String> result = broadcastUtil.getFilterParameters(fixture);
assertEquals(result.size(), 2);
assertTrue(result.contains("genre"));
assertTrue(result.contains("language"));
}
Aggregations