96979899100101102103104105
train_createObject(delegate, service); replay(); assertSame(service, wrapper.createObject()); verify(); } }
160161162163164165166167168169170
String description = proxyFactory.getConstructorLocation(constructor).toString(); ObjectCreator creator = new ConstructorServiceCreator(ServiceResourcesImpl.this, description, constructor); return clazz.cast(creator.createObject()); } }); } @Override
117118119120121122123124
String description = classFactory.getConstructorLocation(constructor).toString(); ObjectCreator creator = new ConstructorServiceCreator(this, description, constructor); return clazz.cast(creator.createObject()); } }
5354555657585960616263
replay(); ObjectCreator sc = new ServiceBuilderMethodInvoker(resources, CREATOR_DESCRIPTION, findMethod(fixture, "build_noargs")); Object actual = sc.createObject(); assertSame(actual, fixture.fie); verify(); }
979899100101102103104105106107
replay(); ObjectCreator sc = new ServiceBuilderMethodInvoker(resources, CREATOR_DESCRIPTION, method); Object actual = sc.createObject(); assertSame(actual, fixture.fie); verify(); }
134135136137138139140141142143144
164165166167168169170171172173174
replay(); ObjectCreator sc = new ServiceBuilderMethodInvoker(resources, CREATOR_DESCRIPTION, findMethod(fixture, "build_injected")); Object actual = sc.createObject(); assertSame(actual, fixture.fie); verify(); }
196197198199200201202203204205206
replay(); ObjectCreator sc = new ServiceBuilderMethodInvoker(resources, CREATOR_DESCRIPTION, findMethod(fixture, "buildWithOrderedConfiguration")); Object actual = sc.createObject(); assertSame(actual, fixture.fie); verify();
229230231232233234235236237238239
replay(); ObjectCreator sc = new ServiceBuilderMethodInvoker(resources, CREATOR_DESCRIPTION, findMethod(fixture, "buildWithUnorderedConfiguration")); Object actual = sc.createObject(); assertSame(actual, fixture.fie); verify(); }
262263264265266267268269270271272
ObjectCreator sc = new ServiceBuilderMethodInvoker(resources, CREATOR_DESCRIPTION, method); try { sc.createObject(); unreachable(); } catch (RuntimeException ex) { Assert.assertEquals(ex.getMessage(), "Builder method " + CREATOR_DESCRIPTION