Examples of ScopeKey


Examples of org.jboss.metadata.spi.scope.ScopeKey

      assertEquals(key1, key2);
   }

   public void testEqualsAfterAdd() throws Exception
   {
      ScopeKey key1 = new ScopeKey();
      ScopeKey key2 = new ScopeKey();
      assertAddScope(key1, testScope1, null);
      assertAddScope(key2, testScope1, null);
      assertAddScope(key1, testScope2, null);
      assertAddScope(key2, testScope2, null);
      assertAddScope(key1, testScope3, null);
View Full Code Here

Examples of org.jboss.metadata.spi.scope.ScopeKey

      assertEquals(key1, key2);
   }

   public void testEqualsAfterRemove() throws Exception
   {
      ScopeKey key1 = new ScopeKey();
      ScopeKey key2 = new ScopeKey();
      assertAddScope(key1, testScope1, null);
      assertAddScope(key2, testScope1, null);
      assertAddScope(key1, testScope2, null);
      assertAddScope(key2, testScope2, null);
      assertAddScope(key1, testScope3, null);
View Full Code Here

Examples of org.jboss.metadata.spi.scope.ScopeKey

      assertEquals(key1, key2);
   }

   public void testEqualsAfterReplace() throws Exception
   {
      ScopeKey key1 = new ScopeKey();
      ScopeKey key2 = new ScopeKey();
      assertAddScope(key1, testScope1, null);
      assertAddScope(key2, testScope1, null);
      assertAddScope(key1, testScope2, null);
      assertAddScope(key2, testScope2, null);
      assertAddScope(key1, testScope3, null);
View Full Code Here

Examples of org.jboss.metadata.spi.scope.ScopeKey

      assertEquals(key1, key2);
   }

   public void testNotEqualsAfterAdd() throws Exception
   {
      ScopeKey key1 = new ScopeKey();
      ScopeKey key2 = new ScopeKey();
      assertAddScope(key1, testScope1, null);
      assertAddScope(key2, testScope1, null);
      assertAddScope(key1, testScope2, null);
      assertAddScope(key2, testScope2, null);
      assertEquals(key1, key2);
View Full Code Here

Examples of org.jboss.metadata.spi.scope.ScopeKey

      assertFalse(key1.equals(key2));
   }

   public void testNotEqualsAfterRemove() throws Exception
   {
      ScopeKey key1 = new ScopeKey();
      ScopeKey key2 = new ScopeKey();
      assertAddScope(key1, testScope1, null);
      assertAddScope(key2, testScope1, null);
      assertAddScope(key1, testScope2, null);
      assertAddScope(key2, testScope2, null);
      assertAddScope(key1, testScope3, null);
View Full Code Here

Examples of org.jboss.metadata.spi.scope.ScopeKey

      assertFalse(key1.equals(key2));
   }

   public void testNotEqualsAfterReplace() throws Exception
   {
      ScopeKey key1 = new ScopeKey();
      ScopeKey key2 = new ScopeKey();
      assertAddScope(key1, testScope1, null);
      assertAddScope(key2, testScope1, null);
      assertAddScope(key1, testScope2, null);
      assertAddScope(key2, testScope2, null);
      assertAddScope(key1, testScope3, null);
View Full Code Here

Examples of org.jboss.metadata.spi.scope.ScopeKey

      assertNull(key.getMaxScopeLevel());
   }

   public void testSingleScopeKeyConstructor() throws Exception
   {
      ScopeKey key = new ScopeKey(testScope1);
      Scope[] expected = new Scope[] { testScope1 };
      assertScopeKey(expected, key);
      assertEquals(testScope1.getScopeLevel(), key.getMaxScopeLevel());
   }
View Full Code Here

Examples of org.jboss.metadata.spi.scope.ScopeKey

      assertEquals(testScope1.getScopeLevel(), key.getMaxScopeLevel());
   }

   public void testLevelQualifierScopeKeyConstructor() throws Exception
   {
      ScopeKey key = new ScopeKey(testLevel1, testQualifier1);
      Scope[] expected = new Scope[] { testScope1 };
      assertScopeKey(expected, key);
      assertEquals(testScope1.getScopeLevel(), key.getMaxScopeLevel());
   }
View Full Code Here

Examples of org.jboss.metadata.spi.scope.ScopeKey

   public void testCollectionScopeKeyConstructor() throws Exception
   {
      Scope[] expected = new Scope[] {};
      HashSet<Scope> set = new HashSet<Scope>();
      ScopeKey key = new ScopeKey(set);
      assertScopeKey(expected, key);
     
      expected = new Scope[] { testScope1 };
      set = new HashSet<Scope>();
      for (Scope scope : expected)
         set.add(scope);
      key = new ScopeKey(set);
      assertScopeKey(expected, key);
      assertEquals(testScope1.getScopeLevel(), key.getMaxScopeLevel());
     
      expected = new Scope[] { testScope1, testScope2, testScope3, testScope4, testScope5 };
      set = new HashSet<Scope>();
      for (Scope scope : expected)
         set.add(scope);
      key = new ScopeKey(set);
      assertScopeKey(expected, key);
      assertEquals(testScope5.getScopeLevel(), key.getMaxScopeLevel());
   }
View Full Code Here

Examples of org.jboss.metadata.spi.scope.ScopeKey

      set.add(testScope2);
      set.add(testScope4);
      set.add(testScope5);
      set.add(testScope3);
      set.add(testScope1);
      ScopeKey key = new ScopeKey(set);
      assertScopeKey(expected, key);
      assertEquals(testScope5.getScopeLevel(), key.getMaxScopeLevel());
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.