Пример #1
0
  @Test(groups = "current")
  public void verifyTestEnabledInheritance() throws SecurityException, NoSuchMethodException {
    {
      Method method = MTest3.class.getMethod("enabled1", new Class[0]);
      ITestAnnotation test1 =
          (ITestAnnotation) m_finder.findAnnotation(method, ITestAnnotation.class);
      Assert.assertFalse(test1.getEnabled());
    }

    {
      Method method = MTest3.class.getMethod("enabled2", new Class[0]);
      ITestAnnotation test1 =
          (ITestAnnotation) m_finder.findAnnotation(method, ITestAnnotation.class);
      Assert.assertTrue(test1.getEnabled());
    }
  }
Пример #2
0
  @Test
  public void verifyTestDependsOnGroupsInheritance()
      throws SecurityException, NoSuchMethodException {
    {
      Method method = MTest3.class.getMethod("dependsOnGroups1", new Class[0]);
      ITestAnnotation test1 =
          (ITestAnnotation) m_finder.findAnnotation(method, ITestAnnotation.class);
      Assert.assertEqualsNoOrder(new String[] {"dog2", "dog1", "dog3"}, test1.getDependsOnGroups());
    }

    {
      Method method = MTest3.class.getMethod("dependsOnGroups2", new Class[0]);
      ITestAnnotation test1 =
          (ITestAnnotation) m_finder.findAnnotation(method, ITestAnnotation.class);
      Assert.assertEqualsNoOrder(new String[] {"dog1", "dog3"}, test1.getDependsOnGroups());
    }
  }
Пример #3
0
 @Test
 public void verifyConfigurationGroupsInheritance()
     throws SecurityException, NoSuchMethodException {
   Method method = MTest3.class.getMethod("beforeSuite", new Class[0]);
   IConfigurationAnnotation test1 =
       (IConfigurationAnnotation) m_finder.findAnnotation(method, IConfigurationAnnotation.class);
   Assert.assertEqualsNoOrder(
       new String[] {"method-test3", "child-class-test3", "base-class"}, test1.getGroups());
 }
Пример #4
0
  @Test
  public void verifyTestGroupsInheritance() throws SecurityException, NoSuchMethodException {
    {
      Method method = MTest3.class.getMethod("groups1", new Class[0]);
      ITestAnnotation test1 =
          (ITestAnnotation) m_finder.findAnnotation(method, ITestAnnotation.class);
      Assert.assertEqualsNoOrder(
          new String[] {"method-test3", "child-class-test3", "base-class"}, test1.getGroups());
    }

    {
      Method method = MTest3.class.getMethod("groups2", new Class[0]);
      ITestAnnotation test1 =
          (ITestAnnotation) m_finder.findAnnotation(method, ITestAnnotation.class);
      Assert.assertEqualsNoOrder(
          new String[] {"child-class-test3", "base-class"}, test1.getGroups());
    }
  }