Tabnine Logo
org.testng
Code IndexAdd Tabnine to your IDE (free)

How to use org.testng

Best Java code snippets using org.testng (Showing top 20 results out of 9,693)

origin: org.testng/testng

private static Throwable getConfigFailureException(ITestContext context) {
  for (IInvokedMethod method : context.getSuite().getAllInvokedMethods()) {
    ITestNGMethod m = method.getTestMethod();
    if (m.isBeforeSuiteConfiguration() && (!method.getTestResult().isSuccess())) {
      return method.getTestResult().getThrowable();
    }
  }
  return null;
}
origin: org.testng/testng

@Override
public void printStackTrace(PrintStream s) {
 reduceStackTrace();
 super.printStackTrace(s);
}
origin: spring-projects/spring-framework

private Throwable getTestResultException(ITestResult testResult) {
  Throwable testResultException = testResult.getThrowable();
  if (testResultException instanceof InvocationTargetException) {
    testResultException = ((InvocationTargetException) testResultException).getCause();
  }
  return testResultException;
}
origin: spring-projects/spring-framework

@AfterClass
void afterClass() {
  assertEquals(numSetUpCalls, NUM_TESTS, "number of calls to setUp().");
  assertEquals(numSetUpCallsInTransaction, NUM_TX_TESTS, "number of calls to setUp() within a transaction.");
  assertEquals(numTearDownCalls, NUM_TESTS, "number of calls to tearDown().");
  assertEquals(numTearDownCallsInTransaction, NUM_TX_TESTS, "number of calls to tearDown() within a transaction.");
}
origin: spring-projects/spring-framework

@Test(dependsOnMethods = { "verifyContextWasDirtied" })
public void verifyContextWasNotDirtied() {
  assertSame(this.applicationContext, this.dirtiedApplicationContext,
    "The application context should NOT have been 'dirtied'.");
}
origin: spring-projects/spring-framework

  @Override
  public void afterTestExecution(TestContext testContext) {
    org.testng.Assert.fail("always failing afterTestExecution()");
  }
}
origin: spring-projects/spring-framework

private void assertNumRowsInPersonTable(int expectedNumRows, String testState) {
  assertEquals(countRowsInTable("person"), expectedNumRows, "the number of rows in the person table ("
      + testState + ").");
}
origin: spring-projects/spring-framework

  protected void assertApplicationContextWasAutowired() {
    org.testng.Assert.assertNotNull(this.applicationContext,
      "The application context should have been autowired.");
  }
}
origin: spring-projects/spring-framework

@Override
public void run(IHookCallBack callBack, ITestResult testResult) {
  this.method = testResult.getMethod().getMethodName();
  super.run(callBack, testResult);
}
origin: spring-projects/spring-framework

@Override
public void onFinish(ITestContext testContext) {
  this.failedConfigurationsCount += testContext.getFailedConfigurations().size();
}
origin: spring-projects/spring-framework

@AfterClass
void afterClass() {
  assertEquals(numSetUpCalls, NUM_TESTS, "number of calls to setUp().");
  assertEquals(numSetUpCallsInTransaction, NUM_TX_TESTS, "number of calls to setUp() within a transaction.");
  assertEquals(numTearDownCalls, NUM_TESTS, "number of calls to tearDown().");
  assertEquals(numTearDownCallsInTransaction, NUM_TX_TESTS, "number of calls to tearDown() within a transaction.");
}
origin: spring-projects/spring-framework

  @Override
  public void afterTestMethod(TestContext testContext) {
    org.testng.Assert.fail("always failing afterTestMethod()");
  }
}
origin: spring-projects/spring-framework

private void performCommonAssertions() {
  assertInTransaction(true);
  assertNotNull(super.applicationContext,
    "The application context should have been set due to ApplicationContextAware semantics.");
  assertNotNull(super.jdbcTemplate,
    "The JdbcTemplate should have been created in setDataSource() via DI for the DataSource.");
}
origin: spring-projects/spring-framework

  @Override
  public void beforeTestMethod(TestContext testContext) {
    org.testng.Assert.fail("always failing beforeTestMethod()");
  }
}
origin: spring-projects/spring-framework

  @Override
  public void afterTestClass(TestContext testContext) {
    org.testng.Assert.fail("always failing afterTestClass()");
  }
}
origin: spring-projects/spring-framework

  @Override
  public void prepareTestInstance(TestContext testContext) throws Exception {
    org.testng.Assert.fail("always failing prepareTestInstance()");
  }
}
origin: spring-projects/spring-framework

  @Override
  public void beforeTestClass(TestContext testContext) {
    org.testng.Assert.fail("always failing beforeTestClass()");
  }
}
origin: spring-projects/spring-framework

  @Override
  public void beforeTestExecution(TestContext testContext) {
    org.testng.Assert.fail("always failing beforeTestExecution()");
  }
}
origin: spring-projects/spring-framework

  @AfterTransaction
  public void afterTransaction() {
    org.testng.Assert.fail("always failing afterTransaction()");
  }
}
origin: spring-projects/spring-framework

  @BeforeTransaction
  public void beforeTransaction() {
    org.testng.Assert.fail("always failing beforeTransaction()");
  }
}
org.testng

Most used classes

  • Test
  • Assert
    Assertion tool class. Presents assertion methods with a more natural parameter order. The order is a
  • BeforeClass
  • BeforeMethod
  • AfterClass
  • DataProvider,
  • AssertJUnit,
  • BeforeTest,
  • ITestResult,
  • ITestNGMethod,
  • BeforeSuite,
  • SkipException,
  • ITestContext,
  • AfterTest,
  • IClass,
  • ISuite,
  • ConstructorOrMethod,
  • XmlTest,
  • AfterSuite
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now