Hi to anyone, 

I want to migrate junit3 to junit4 - and want to migrate any occurences
of assert<Foo> with an static import. 
I want to migrate any method call

Assert.assert<Foo> 

to 

import static org.junit.Assert.assert<Foo>;

assert<Foo> (....)

I added the static import with: 
StaticMemberImport staticMemberImport =
ImportsFactory.eINSTANCE.createStaticMemberImport();
staticMemberImport.setStatic(ModifiersFactory.eINSTANCE.createStatic());
staticMemberImport.getNamespaces().addAll(classifier.getContainingPackageName());
staticMemberImport.getNamespaces().add(classifier.getName());
staticMemberImport.getStaticMembers().add(method);

This works fine for me.

But how can I simplfy the methodcall itself? 

Thanks for help
Cheers
Markus






_______________________________________________
emftext-users mailing list
[email protected]
http://mail-st.inf.tu-dresden.de/cgi-bin/mailman/listinfo/emftext-users

Reply via email to