@Test public void simple_pipeline() { pipeline = getPipelineImplFromFactory("simple"); assertInvoke(pipeline, false); assertLog("1-1", "1-2", "1-3"); }
@Test public void inject_scoped_pipeline() { pipeline = getPipelineImplFromFactory("injectScoped"); assertInvoke(pipeline, false); assertLog( "1-1" /* sub-pipeline */, // "2-1", "2-2", "2-3", // "1-3"); }
@Test public void scoped_pipeline() { Pipeline pipelineProxy = assertProxy(getPipelineFromFactory("scoped")); assertInvoke(pipelineProxy, false); assertLog("1-1", "1-2", "1-3"); Pipeline real1 = getProxyTarget(pipelineProxy); assertSame(real1, beansHolder.get().get("proxyTarget.scoped")); // 清除scope,重新调用proxy beansHolder.remove(); assertInvoke(pipelineProxy, false); assertLog("1-1", "1-2", "1-3"); Pipeline real2 = getProxyTarget(pipelineProxy); assertSame(real2, beansHolder.get().get("proxyTarget.scoped")); assertNotSame(real1, real2); }