Examples of ScopeKey


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

   }

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

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

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

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

      assertEquals(testScope5.getScopeLevel(), key.getMaxScopeLevel());
   }
  
   public void testAddScope() throws Exception
   {
      ScopeKey key = new ScopeKey();
      assertAddScope(key, testScope1, null);
      Scope[] expected = new Scope[] { testScope1 };
      assertScopeKey(expected, key);
      assertEquals(testScope1.getScopeLevel(), key.getMaxScopeLevel());

      assertAddScope(key, testScope2, null);
      expected = new Scope[] { testScope1, testScope2 };
      assertScopeKey(expected, key);
      assertEquals(testScope2.getScopeLevel(), key.getMaxScopeLevel());
   }
View Full Code Here

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

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

   public void testAddScopeDuplicate() throws Exception
   {
      ScopeKey key = new ScopeKey();
      assertAddScope(key, testScope1, null);
      Scope[] expected = new Scope[] { testScope1 };
      assertScopeKey(expected, key);
      assertEquals(testScope1.getScopeLevel(), key.getMaxScopeLevel());

      assertAddScope(key, testScope1, 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 testAddScopeSorts() throws Exception
   {
      ScopeKey key = new ScopeKey();
      assertAddScope(key, testScope1, null);
      assertAddScope(key, testScope3, null);
      assertAddScope(key, testScope5, null);
      assertAddScope(key, testScope2, null);
      assertAddScope(key, testScope4, null);
      Scope[] expected = new Scope[] { testScope1, testScope2, testScope3, testScope4, testScope5 };
      assertScopeKey(expected, key);
      assertEquals(testScope5.getScopeLevel(), key.getMaxScopeLevel());
   }
View Full Code Here

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

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

   public void testAddScopeChange() throws Exception
   {
      ScopeKey key = new ScopeKey();
      assertAddScope(key, testScope1, null);
      Scope[] expected = new Scope[] { testScope1 };
      assertScopeKey(expected, key);
      assertEquals(testScope1.getScopeLevel(), key.getMaxScopeLevel());

      assertAddScope(key, testScope1Different, testScope1);
      expected = new Scope[] { testScope1Different };
      assertScopeKey(expected, key);
      assertEquals(testScope1Different.getScopeLevel(), key.getMaxScopeLevel());
   }
View Full Code Here

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

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

   public void testAddScopeChangeSorts() throws Exception
   {
      ScopeKey key = new ScopeKey();
      assertAddScope(key, testScope1, null);
      assertAddScope(key, testScope2, null);
      assertAddScope(key, testScope3, null);
      assertAddScope(key, testScope4, null);
      assertAddScope(key, testScope5, null);
      Scope[] expected = new Scope[] { testScope1, testScope2, testScope3, testScope4, testScope5 };
      assertScopeKey(expected, key);
      assertEquals(testScope5.getScopeLevel(), key.getMaxScopeLevel());

      assertAddScope(key, testScope3Different, testScope3);
      expected = new Scope[] { testScope1, testScope2, testScope3Different, testScope4, testScope5 };
      assertScopeKey(expected, key);
      assertEquals(testScope5.getScopeLevel(), key.getMaxScopeLevel());
   }
View Full Code Here

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

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

   public void testAddScopeLevelQualifier() throws Exception
   {
      ScopeKey key = new ScopeKey();
      assertAddScope(key, testLevel1, testQualifier1, null);
      Scope[] expected = new Scope[] { testScope1 };
      assertScopeKey(expected, key);
      assertEquals(testScope1.getScopeLevel(), key.getMaxScopeLevel());

      assertAddScope(key, testLevel2, testQualifier2, null);
      expected = new Scope[] { testScope1, testScope2 };
      assertScopeKey(expected, key);
      assertEquals(testScope2.getScopeLevel(), key.getMaxScopeLevel());
   }
View Full Code Here

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

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

   public void testAddScopeLevelQualifierDuplicate() throws Exception
   {
      ScopeKey key = new ScopeKey();
      assertAddScope(key, testLevel1, testQualifier1, null);
      Scope[] expected = new Scope[] { testScope1 };
      assertScopeKey(expected, key);
      assertEquals(testScope1.getScopeLevel(), key.getMaxScopeLevel());

      assertAddScope(key, testLevel1, testQualifier1, 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 testAddScopeLevelQualifierSorts() throws Exception
   {
      ScopeKey key = new ScopeKey();
      assertAddScope(key, testLevel4, testQualifier4, null);
      assertAddScope(key, testLevel2, testQualifier2, null);
      assertAddScope(key, testLevel1, testQualifier1, null);
      assertAddScope(key, testLevel3, testQualifier3, null);
      assertAddScope(key, testLevel5, testQualifier5, null);
      Scope[] expected = new Scope[] { testScope1, testScope2, testScope3, testScope4, testScope5 };
      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.