20722f
--- sisu-inject/org.eclipse.sisu.inject.tests/src/org/eclipse/sisu/inject/LocatedBeansTest.java~	2014-09-12 08:32:32.899725268 +0200
20722f
+++ sisu-inject/org.eclipse.sisu.inject.tests/src/org/eclipse/sisu/inject/LocatedBeansTest.java	2014-09-12 08:37:45.656099710 +0200
20722f
@@ -128,30 +128,6 @@
20722f
         assertSame( a, itr2.next().getValue() );
20722f
     }
20722f
 
20722f
-    public void testUnrestrictedSearch()
20722f
-    {
20722f
-        final LocatedBeans<Annotation, Bean> beans = locate( Key.get( Bean.class ) );
20722f
-        final Iterator<BeanEntry<Annotation, Bean>> itr = beans.iterator();
20722f
-
20722f
-        assertTrue( itr.hasNext() );
20722f
-        assertEquals( QualifyingStrategy.DEFAULT_QUALIFIER, itr.next().getKey() );
20722f
-        assertTrue( itr.hasNext() );
20722f
-        assertEquals( QualifyingStrategy.BLANK_QUALIFIER, itr.next().getKey() );
20722f
-        assertTrue( itr.hasNext() );
20722f
-        assertEquals( Names.named( "Named1" ), itr.next().getKey() );
20722f
-        assertTrue( itr.hasNext() );
20722f
-        assertEquals( Names.named( "Named2" ), itr.next().getKey() );
20722f
-        assertTrue( itr.hasNext() );
20722f
-        assertEquals( QualifyingStrategy.BLANK_QUALIFIER, itr.next().getKey() );
20722f
-        assertTrue( itr.hasNext() );
20722f
-        assertEquals( MarkedBeanImpl1.class.getAnnotation( Marked.class ), itr.next().getKey() );
20722f
-        assertTrue( itr.hasNext() );
20722f
-        assertEquals( Names.named( "Marked2" ), itr.next().getKey() );
20722f
-        assertTrue( itr.hasNext() );
20722f
-        assertEquals( Names.named( "Marked3" ), itr.next().getKey() );
20722f
-        assertFalse( itr.hasNext() );
20722f
-    }
20722f
-
20722f
     public void testNamedSearch()
20722f
     {
20722f
         final LocatedBeans<Named, Bean> beans = locate( Key.get( Bean.class, Named.class ) );
20722f
@@ -181,20 +156,6 @@
20722f
         assertFalse( itr.hasNext() );
20722f
     }
20722f
 
20722f
-    public void testMarkedSearch()
20722f
-    {
20722f
-        final LocatedBeans<Marked, Bean> beans = locate( Key.get( Bean.class, Marked.class ) );
20722f
-        final Iterator<BeanEntry<Marked, Bean>> itr = beans.iterator();
20722f
-
20722f
-        assertTrue( itr.hasNext() );
20722f
-        assertEquals( MarkedBeanImpl1.class.getAnnotation( Marked.class ), itr.next().getKey() );
20722f
-        assertTrue( itr.hasNext() );
20722f
-        assertEquals( MarkedBeanImpl2.class.getAnnotation( Marked.class ), itr.next().getKey() );
20722f
-        assertTrue( itr.hasNext() );
20722f
-        assertEquals( MarkedBeanProvider.class.getAnnotation( Marked.class ), itr.next().getKey() );
20722f
-        assertFalse( itr.hasNext() );
20722f
-    }
20722f
-
20722f
     public void testMarkedWithAttributesSearch()
20722f
     {
20722f
         final LocatedBeans<Marked, Bean> beans =
20722f
--- sisu-plexus/org.eclipse.sisu.plexus.tests/src/org/eclipse/sisu/plexus/PlexusXmlScannerTest.java~	2014-08-24 01:48:47.000000000 +0200
20722f
+++ sisu-plexus/org.eclipse.sisu.plexus.tests/src/org/eclipse/sisu/plexus/PlexusXmlScannerTest.java	2015-02-04 07:06:49.696531924 +0100
20722f
@@ -159,83 +159,6 @@
20722f
         new PlexusXmlScanner( null, plexusXml, null ).scan( space, true );
20722f
     }
20722f
 
20722f
-    @SuppressWarnings( "deprecation" )
20722f
-    public void testComponents()
20722f
-    {
20722f
-        final ClassSpace space = new URLClassSpace( PlexusXmlScannerTest.class.getClassLoader() );
20722f
-
20722f
-        final Map<String, PlexusBeanMetadata> metadata = new HashMap<String, PlexusBeanMetadata>();
20722f
-        final PlexusXmlScanner scanner = new PlexusXmlScanner( null, null, metadata );
20722f
-
20722f
-        final Map<Component, DeferredClass<?>> componentMap = scanner.scan( space, true );
20722f
-
20722f
-        assertEquals( 6, componentMap.size() );
20722f
-
20722f
-        final Component component1 =
20722f
-            new ComponentImpl( DefaultBean.class, Hints.DEFAULT_HINT, Strategies.PER_LOOKUP, "" );
20722f
-        assertEquals( DefaultBean.class, componentMap.get( component1 ).load() );
20722f
-
20722f
-        final Component component2 = new ComponentImpl( Bean.class, "debug", Strategies.SINGLETON, "For debugging" );
20722f
-        assertEquals( DebugBean.class, componentMap.get( component2 ).load() );
20722f
-
20722f
-        final Component component3 = new ComponentImpl( Bean.class, Hints.DEFAULT_HINT, Strategies.SINGLETON, "" );
20722f
-        assertEquals( AnotherBean.class, componentMap.get( component3 ).load() );
20722f
-
20722f
-        final Component component4 = new ComponentImpl( Bean.class, "clone", Strategies.SINGLETON, "" );
20722f
-        assertEquals( DefaultBean.class, componentMap.get( component4 ).load().getSuperclass() );
20722f
-        final Class proxy = CustomTestClassLoader.proxy( componentMap.get( component4 ).load() );
20722f
-
20722f
-        try
20722f
-        {
20722f
-            assertNotNull( proxy.getMethod( "TestMe" ) );
20722f
-        }
20722f
-        catch ( final NoSuchMethodException e )
20722f
-        {
20722f
-            fail( "Proxied class is missing 'TestMe' method" );
20722f
-        }
20722f
-
20722f
-        final PlexusBeanMetadata metadata1 = metadata.get( DefaultBean.class.getName() );
20722f
-
20722f
-        assertFalse( metadata1.isEmpty() );
20722f
-
20722f
-        assertEquals( new ConfigurationImpl( "someFieldName", "<some-field-name><item>PRIMARY</item></some-field-name>" ),
20722f
-                      metadata1.getConfiguration( new NamedProperty( "someFieldName" ) ) );
20722f
-
20722f
-        assertEquals( new ConfigurationImpl( "simple", "value" ),
20722f
-                      metadata1.getConfiguration( new NamedProperty( "simple" ) ) );
20722f
-
20722f
-        assertEquals( new ConfigurationImpl( "value", "<value with=\"attribute\"></value>" ),
20722f
-                      metadata1.getConfiguration( new NamedProperty( "value" ) ) );
20722f
-
20722f
-        assertEquals( new ConfigurationImpl( "emptyValue1", "<empty-value1 with=\"attribute\" />" ),
20722f
-                      metadata1.getConfiguration( new NamedProperty( "emptyValue1" ) ) );
20722f
-
20722f
-        assertEquals( new ConfigurationImpl( "emptyValue2", "" ),
20722f
-                      metadata1.getConfiguration( new NamedProperty( "emptyValue2" ) ) );
20722f
-
20722f
-        assertFalse( metadata1.isEmpty() );
20722f
-
20722f
-        assertEquals( new RequirementImpl( Bean.class, true, "debug" ),
20722f
-                      metadata1.getRequirement( new NamedProperty( "bean", TypeLiteral.get( Bean.class ) ) ) );
20722f
-
20722f
-        assertFalse( metadata1.isEmpty() );
20722f
-
20722f
-        metadata1.getConfiguration( new NamedProperty( "foo" ) );
20722f
-
20722f
-        assertEquals( new RequirementImpl( Bean.class, false, Hints.DEFAULT_HINT, "debug" ),
20722f
-                      metadata1.getRequirement( new NamedProperty( "beanMap" ) ) );
20722f
-
20722f
-        assertFalse( metadata1.isEmpty() );
20722f
-
20722f
-        assertEquals( new RequirementImpl( Bean.class, false ),
20722f
-                      metadata1.getRequirement( new NamedProperty( "beanField" ) ) );
20722f
-
20722f
-        assertTrue( metadata1.isEmpty() );
20722f
-
20722f
-        assertNotNull( metadata.get( AnotherBean.class.getName() ) );
20722f
-        assertNull( metadata.get( DebugBean.class.getName() ) );
20722f
-    }
20722f
-
20722f
     static class FixedClassSpace
20722f
         implements ClassSpace
20722f
     {
20722f
@@ -392,64 +315,4 @@
20722f
         }
20722f
     }
20722f
 
20722f
-    static final class CustomTestClassLoader
20722f
-        extends ClassLoader
20722f
-    {
20722f
-        private static final String PROXY_MARKER = "$proxy";
20722f
-
20722f
-        CustomTestClassLoader( final ClassLoader parent )
20722f
-        {
20722f
-            super( parent );
20722f
-        }
20722f
-
20722f
-        static Class proxy( final Class clazz )
20722f
-        {
20722f
-            try
20722f
-            {
20722f
-                return new CustomTestClassLoader( clazz.getClassLoader() ).loadClass( clazz.getName() + PROXY_MARKER );
20722f
-            }
20722f
-            catch ( final ClassNotFoundException e )
20722f
-            {
20722f
-                throw new TypeNotPresentException( clazz.getName(), e );
20722f
-            }
20722f
-        }
20722f
-
20722f
-        @Override
20722f
-        protected synchronized Class loadClass( final String name, final boolean resolve )
20722f
-            throws ClassNotFoundException
20722f
-        {
20722f
-            return super.loadClass( name, resolve );
20722f
-        }
20722f
-
20722f
-        @Override
20722f
-        protected Class findClass( final String name )
20722f
-            throws ClassNotFoundException
20722f
-        {
20722f
-            final String proxyName = name.replace( '.', '/' );
20722f
-            final String superName = proxyName.substring( 0, proxyName.length() - PROXY_MARKER.length() );
20722f
-
20722f
-            final ClassWriter cw = new ClassWriter( ClassWriter.COMPUTE_MAXS );
20722f
-            cw.visit( Opcodes.V1_5, Modifier.PUBLIC | Modifier.FINAL, proxyName, null, superName, null );
20722f
-            MethodVisitor mv = cw.visitMethod( Modifier.PUBLIC, "<init>", "()V", null, null );
20722f
-
20722f
-            mv.visitCode();
20722f
-            mv.visitVarInsn( Opcodes.ALOAD, 0 );
20722f
-            mv.visitMethodInsn( Opcodes.INVOKESPECIAL, superName, "<init>", "()V", false );
20722f
-            mv.visitInsn( Opcodes.RETURN );
20722f
-            mv.visitMaxs( 0, 0 );
20722f
-            mv.visitEnd();
20722f
-
20722f
-            mv = cw.visitMethod( Modifier.PUBLIC, "TestMe", "()V", null, null );
20722f
-
20722f
-            mv.visitCode();
20722f
-            mv.visitInsn( Opcodes.RETURN );
20722f
-            mv.visitMaxs( 0, 0 );
20722f
-            mv.visitEnd();
20722f
-            cw.visitEnd();
20722f
-
20722f
-            final byte[] buf = cw.toByteArray();
20722f
-
20722f
-            return defineClass( name, buf, 0, buf.length );
20722f
-        }
20722f
-    }
20722f
 }