diff options
author | mwebster <mwebster> | 2006-07-18 10:18:05 +0000 |
---|---|---|
committer | mwebster <mwebster> | 2006-07-18 10:18:05 +0000 |
commit | 52c25536d8f9d8ad1438921e0542c259906a3793 (patch) | |
tree | be035b21603d0af6aa041a991852f041fb0e3f17 /loadtime/testsrc | |
parent | b15cda7add8a6d7f288ce6132c9c2cd328bba7bc (diff) | |
download | aspectj-52c25536d8f9d8ad1438921e0542c259906a3793.tar.gz aspectj-52c25536d8f9d8ad1438921e0542c259906a3793.zip |
Fix for Bug 150254 "Provide context for LTW verbose messages" (tidy up ClassLoaderWeavingAdaptor.initialize())
Diffstat (limited to 'loadtime/testsrc')
-rw-r--r-- | loadtime/testsrc/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptorTest.java | 12 | ||||
-rw-r--r-- | loadtime/testsrc/org/aspectj/weaver/loadtime/WeavingContextTest.java | 23 |
2 files changed, 20 insertions, 15 deletions
diff --git a/loadtime/testsrc/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptorTest.java b/loadtime/testsrc/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptorTest.java index a2a07c89a..805b989a6 100644 --- a/loadtime/testsrc/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptorTest.java +++ b/loadtime/testsrc/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptorTest.java @@ -19,26 +19,30 @@ public class ClassLoaderWeavingAdaptorTest extends TestCase { public void testClassLoaderWeavingAdaptor() { ClassLoader loader = new URLClassLoader(new URL[] {}, null); - ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor(loader,null); + ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor(); + adaptor.initialize(loader,null); } public void testGetNamespace() { ClassLoader loader = new URLClassLoader(new URL[] {}, null); - ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor(loader,null); + ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor(); + adaptor.initialize(loader,null); String namespace = adaptor.getNamespace(); assertEquals("Namespace should be empty","",namespace); } public void testGeneratedClassesExistFor() { ClassLoader loader = new URLClassLoader(new URL[] {}, null); - ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor(loader,null); + ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor(); + adaptor.initialize(loader,null); boolean exist = adaptor.generatedClassesExistFor("Junk"); assertFalse("There should be no generated classes",exist); } public void testFlushGeneratedClasses() { ClassLoader loader = new URLClassLoader(new URL[] {}, null); - ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor(loader,null); + ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor(); + adaptor.initialize(loader,null); adaptor.flushGeneratedClasses(); boolean exist = adaptor.generatedClassesExistFor("Junk"); assertFalse("There should be no generated classes",exist); diff --git a/loadtime/testsrc/org/aspectj/weaver/loadtime/WeavingContextTest.java b/loadtime/testsrc/org/aspectj/weaver/loadtime/WeavingContextTest.java index 7d5318219..af2e49182 100644 --- a/loadtime/testsrc/org/aspectj/weaver/loadtime/WeavingContextTest.java +++ b/loadtime/testsrc/org/aspectj/weaver/loadtime/WeavingContextTest.java @@ -25,7 +25,8 @@ public class WeavingContextTest extends TestCase { public void testWeavingContext() { URLClassLoader loader = new URLClassLoader(new URL[] {},null); IWeavingContext context = new TestWeavingContext(loader); - ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor(loader,context); + ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor(); + adaptor.initialize(loader,context); } public void testGetResources() { @@ -38,8 +39,8 @@ public class WeavingContextTest extends TestCase { } }; - ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor(loader,context); - adaptor.initialize(null,null); + ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor(); + adaptor.initialize(loader,context); assertTrue("IWeavingContext not called",called); } @@ -53,9 +54,9 @@ public class WeavingContextTest extends TestCase { } }; - ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor(loader,context); + ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor(); try { - adaptor.initialize(null,null); + adaptor.initialize(loader,context); } catch (UnsupportedOperationException ex) { fail("IWeavingContect.getBundleIdFromURL() is deprecated"); @@ -72,8 +73,8 @@ public class WeavingContextTest extends TestCase { } }; - ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor(loader,context); - adaptor.initialize(null,null); + ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor(); + adaptor.initialize(loader,context); assertTrue("IWeavingContext not called",called); } @@ -90,8 +91,8 @@ public class WeavingContextTest extends TestCase { } }; - ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor(loader,context); - adaptor.initialize(null,null); + ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor(); + adaptor.initialize(loader,context); assertTrue("IWeavingContext not called",called); } @@ -108,8 +109,8 @@ public class WeavingContextTest extends TestCase { } }; - ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor(loader,context); - adaptor.initialize(null,null); + ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor(); + adaptor.initialize(loader,context); assertTrue("IWeavingContext not called",called); } |