use of com.google.gwt.inject.rebind.util.InjectorWriteContext in project google-gin by gwtplus.
the class BindConstantBindingTest method assertCreationStatements.
/**
* Verifies that invoking binding.getCreationStatements() produces no helper
* methods, does not invoke any methods on the write context, and produces the
* given statements.
*/
private void assertCreationStatements(Binding binding, String expectedStatements) throws NoSourceNameException {
InjectorWriteContext writeContextMock = createMock(InjectorWriteContext.class);
replay(writeContextMock);
List<InjectorMethod> methods = new ArrayList<InjectorMethod>();
String actualStatements = binding.getCreationStatements(null, methods).getSource(writeContextMock);
assertEquals(expectedStatements, actualStatements);
assertEquals(0, methods.size());
verify(writeContextMock);
}
Aggregations