[seam-commits] Seam SVN: r10899 - modules/trunk/bridge-api/src/test/java/org/jboss/seam/bridge.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue May 12 03:11:16 EDT 2009


Author: dan.j.allen
Date: 2009-05-12 03:11:16 -0400 (Tue, 12 May 2009)
New Revision: 10899

Modified:
   modules/trunk/bridge-api/src/test/java/org/jboss/seam/bridge/ManagerBridgeServiceLoaderTest.java
   modules/trunk/bridge-api/src/test/java/org/jboss/seam/bridge/ManagerBridgeTest.java
Log:
cleanup imports


Modified: modules/trunk/bridge-api/src/test/java/org/jboss/seam/bridge/ManagerBridgeServiceLoaderTest.java
===================================================================
--- modules/trunk/bridge-api/src/test/java/org/jboss/seam/bridge/ManagerBridgeServiceLoaderTest.java	2009-05-12 07:11:03 UTC (rev 10898)
+++ modules/trunk/bridge-api/src/test/java/org/jboss/seam/bridge/ManagerBridgeServiceLoaderTest.java	2009-05-12 07:11:16 UTC (rev 10899)
@@ -1,13 +1,12 @@
 package org.jboss.seam.bridge;
 
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
 import static org.testng.Assert.assertSame;
 import static org.testng.Assert.assertTrue;
 
 import javax.context.RequestScoped;
 import javax.inject.manager.Manager;
 
+import org.jboss.seam.bridge.spi.ManagerProvider;
 import org.jboss.seam.bridge.stubs.ManagerProviderStub;
 import org.jboss.testharness.impl.packaging.Artifact;
 import org.jboss.webbeans.test.AbstractWebBeansTest;
@@ -43,12 +42,12 @@
    @Test
    public void testLoadValidManagerProvider()
    {
-      assertNotNull(ManagerBridge.getProvider());
-      assertTrue(ManagerBridge.getProvider() instanceof ManagerProviderStub);
-      assertSame(ManagerBridge.getProvider().getRootManager(), getCurrentManager());
-      assertSame(ManagerBridge.getProvider().getCurrentManager(), getCurrentManager());
+      ManagerProvider provider = ManagerBridge.getProvider();
+      assertTrue(provider instanceof ManagerProviderStub);
+      assertSame(provider.getRootManager(), getCurrentManager());
+      assertSame(provider.getCurrentManager(), getCurrentManager());
       Manager currentManager = getCurrentManager().setCurrent(RequestScoped.class);
-      assertSame(ManagerBridge.getProvider().getCurrentManager(), currentManager);
+      assertSame(provider.getCurrentManager(), currentManager);
    }
    
 }

Modified: modules/trunk/bridge-api/src/test/java/org/jboss/seam/bridge/ManagerBridgeTest.java
===================================================================
--- modules/trunk/bridge-api/src/test/java/org/jboss/seam/bridge/ManagerBridgeTest.java	2009-05-12 07:11:03 UTC (rev 10898)
+++ modules/trunk/bridge-api/src/test/java/org/jboss/seam/bridge/ManagerBridgeTest.java	2009-05-12 07:11:16 UTC (rev 10899)
@@ -1,16 +1,15 @@
 package org.jboss.seam.bridge;
 
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
 import static org.testng.Assert.assertSame;
 import static org.testng.Assert.assertTrue;
 
 import javax.context.RequestScoped;
 import javax.inject.manager.Manager;
 
+import org.jboss.seam.bridge.spi.ManagerProvider;
+import org.jboss.seam.bridge.stubs.IncorrectManagerProviderResolverStub;
+import org.jboss.seam.bridge.stubs.ManagerProviderResolverStub;
 import org.jboss.seam.bridge.stubs.ManagerProviderStub;
-import org.jboss.seam.bridge.stubs.ManagerProviderResolverStub;
-import org.jboss.seam.bridge.stubs.IncorrectManagerProviderResolverStub;
 import org.jboss.testharness.impl.packaging.Artifact;
 import org.jboss.webbeans.test.AbstractWebBeansTest;
 import org.testng.annotations.BeforeMethod;
@@ -47,11 +46,12 @@
       ManagerBridge bridge = new ManagerBridge();
       bridge.setResolverClass(ManagerProviderResolverStub.class);
       bridge.onManagerDeployed(getCurrentManager());
-      assertTrue(ManagerBridge.getProvider() instanceof ManagerProviderStub);
-      assertSame(ManagerBridge.getProvider().getRootManager(), getCurrentManager());
-      assertSame(ManagerBridge.getProvider().getCurrentManager(), getCurrentManager());
+      ManagerProvider provider = ManagerBridge.getProvider();
+      assertTrue(provider instanceof ManagerProviderStub);
+      assertSame(provider.getRootManager(), getCurrentManager());
+      assertSame(provider.getCurrentManager(), getCurrentManager());
       Manager currentManager = getCurrentManager().setCurrent(RequestScoped.class);
-      assertSame(ManagerBridge.getProvider().getCurrentManager(), currentManager);
+      assertSame(provider.getCurrentManager(), currentManager);
    }
    
    /**




More information about the seam-commits mailing list