use of org.apache.tapestry5.services.EnvironmentalShadowBuilder in project tapestry-5 by apache.
the class EnvironmentalShadowBuilderImplTest method proxy_class.
@Test
public void proxy_class() {
JavaScriptSupport delegate = newMock(JavaScriptSupport.class);
Environment env = mockEnvironment();
train_peekRequired(env, JavaScriptSupport.class, delegate);
expect(delegate.allocateClientId("fred")).andReturn("barney");
replay();
EnvironmentalShadowBuilder builder = new EnvironmentalShadowBuilderImpl(getService("PlasticProxyFactory", PlasticProxyFactory.class), env);
JavaScriptSupport proxy = builder.build(JavaScriptSupport.class);
assertEquals(proxy.allocateClientId("fred"), "barney");
verify();
}
Aggregations