Package junit.framework

Examples of junit.framework.JUnit4TestCaseFacade


    }

    @Override
    protected TestDescriptorInternal convert(Object id, Test test) {
        if (test instanceof JUnit4TestCaseFacade) {
            JUnit4TestCaseFacade facade = (JUnit4TestCaseFacade) test;
            Matcher matcher = Pattern.compile("(.*)\\((.*)\\)").matcher(facade.toString());
            String className = facade.toString();
            String methodName = null;
            if (matcher.matches()) {
                className = matcher.group(2);
                methodName = matcher.group(1);
            }
View Full Code Here


    }

    public void testIgnored(Test test) {
        String message = null;
        if (test instanceof JUnit4TestCaseFacade) {
            JUnit4TestCaseFacade facade = (JUnit4TestCaseFacade) test;
            Ignore annotation = facade.getDescription().getAnnotation(Ignore.class);
            if (annotation != null && annotation.value().length() > 0) {
                message = annotation.value();
            }
        }
        formatSkip(test, message);
View Full Code Here


    public void testIgnored(Test test) {
        String message = null;
        if (test instanceof JUnit4TestCaseFacade) {
            JUnit4TestCaseFacade facade = (JUnit4TestCaseFacade) test;
            Ignore annotation = facade.getDescription().getAnnotation(Ignore.class);
            if (annotation != null && annotation.value().length() > 0) {
                message = annotation.value();
            }
        }
        formatSkip(test, message);
View Full Code Here

    assertThat(Tests.testClassNameFrom((junit.framework.Test)test)).isEqualTo("testClassName");
  }

  @Test
  public void shouldReturnToStringAsClassNameIfTestIsJUnit4TestCaseFacade() {
    JUnit4TestCaseFacade test = createJUnit4TestCaseFacade("hello");
    assertThat(Tests.testClassNameFrom(test)).isEqualTo(JUnit4TestCaseFacade.class.getName());
  }
View Full Code Here

    assertThat(Tests.testClassNameFrom(test)).isEqualTo(JUnit4TestCaseFacade.class.getName());
  }

  @Test
  public void shouldReturnToStringWithoutClassNameAsClasNameIfTestIsJUnit4TestCaseFacade() {
    JUnit4TestCaseFacade test = createJUnit4TestCaseFacade("hello(world)");
    assertThat(Tests.testClassNameFrom(test)).isEqualTo("world");
  }
View Full Code Here

        notifier.fireTestFailure(failure);
      }
     
      private Description asDescription(Test test) {
        if (test instanceof JUnit4TestCaseFacade) {
          JUnit4TestCaseFacade facade= (JUnit4TestCaseFacade) test;
          return facade.getDescription();
        }
        return Description.createTestDescription(test.getClass(), getName(test));
      }

      private String getName(Test test) {
View Full Code Here

        notifier.fireTestFailure(failure);
      }
     
      private Description asDescription(Test test) {
        if (test instanceof JUnit4TestCaseFacade) {
          JUnit4TestCaseFacade facade= (JUnit4TestCaseFacade) test;
          return facade.getDescription();
        }
        return Description.createTestDescription(test.getClass(), getName(test));
      }

      private String getName(Test test) {
View Full Code Here

      fNotifier.fireTestFailure(failure);
    }

    private Description asDescription(Test test) {
      if (test instanceof JUnit4TestCaseFacade) {
        JUnit4TestCaseFacade facade= (JUnit4TestCaseFacade) test;
        return facade.getDescription();
      }
      return Description.createTestDescription(test.getClass(), getName(test));
    }
View Full Code Here

      fNotifier.fireTestFailure(failure);
    }

    private Description asDescription(Test test) {
      if (test instanceof JUnit4TestCaseFacade) {
        JUnit4TestCaseFacade facade= (JUnit4TestCaseFacade) test;
        return facade.getDescription();
      }
      return Description.createTestDescription(test.getClass(), getName(test));
    }
View Full Code Here

      fNotifier.fireTestFailure(failure);
    }

    private Description asDescription(Test test) {
      if (test instanceof JUnit4TestCaseFacade) {
        JUnit4TestCaseFacade facade= (JUnit4TestCaseFacade) test;
        return facade.getDescription();
      }
      return Description.createTestDescription(test.getClass(), getName(test));
    }
View Full Code Here

TOP

Related Classes of junit.framework.JUnit4TestCaseFacade

Copyright © 2018 www.massapicom. 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.