Skip to content

Instantly share code, notes, and snippets.

@edipofederle
Created March 11, 2013 20:19
Show Gist options
  • Select an option

  • Save edipofederle/5137372 to your computer and use it in GitHub Desktop.

Select an option

Save edipofederle/5137372 to your computer and use it in GitHub Desktop.
protected <T extends Element> void assertContains(List<T> list, String ... expected) {
for (Element t : list) {
String name = t.getName();
if(list.get(0) instanceof mestrado.arquitetura.representation.Package)
for (String str : expected) if(str.equalsIgnoreCase(name)) return ;
if(list.get(0) instanceof mestrado.arquitetura.representation.Class)
for (String str : expected) if(str.equalsIgnoreCase(name)) return ;
}
Assert.fail("list there is no element called " + expected);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment