Package com.hamburgsud.log4testing.core.data

Examples of com.hamburgsud.log4testing.core.data.TestSuite


  /**
   * Tests the assertion assertNotFailed for TestSuites
   */
  @Test
  public void testAssertNotFailedTsc() {
    TestSuite testSuite = new TestSuite("TestSuite1");
    TestCase testCase1 = new TestCase("TestCase1");
    testCase1.newTestStepGroup("TestStepGroup1");
    testCase1.addTestStep(OKTestStep());
    testCase1.addTestStep(OKTestStep());
    Assert.assertNotFailed(testCase1);
    testSuite.addTestCase(testCase1);
    Assert.assertNotFailed(testSuite);
  }
View Full Code Here


  /**
   * Tests the assertion assertNotFailed for TestSuites with ErrorTestStep
   */
  @Test(expected = AssertionError.class)
  public void testAssertNotFailedTscTSAssertionError() {
    TestSuite testSuite = new TestSuite("TestSuite1");
    TestCase testCase1 = new TestCase("TestCase1");
    testCase1.newTestStepGroup("TestStepGroup1");
    testCase1.addTestStep(OKTestStep());
    testCase1.addTestStep(ErrorTestStep());
    testSuite.addTestCase(testCase1);
    Assert.assertNotFailed(testSuite);
  }
View Full Code Here

  /**
   * Tests the assertion assertOK for TestSuites
   */
  @Test
  public void testAssertOkTS() {
    TestSuite testSuite1 = new TestSuite("TestSuite1");
    TestCase testCase1 = new TestCase("TestCase1");
    testCase1.newTestStepGroup("TestStepGroup1");
    final TestStep testStep = testCase.newTestStep(TestStatus.OK,
        "mySimpleTestCommand", "This is just a simple test.",
        "Everything is working fine.");
    testStep.finish();
    testCase1.addTestStep(testStep);
    testSuite1.addTestCase(testCase1);
    Assert.assertOk(testSuite1);
  }
View Full Code Here

    testSuites = new Hashtable<String, TestSuite>(50);
    testCases = new Hashtable<String, TestCase>(500);
  }

  public static TestSuite getTestSuite(final String name) {
    TestSuite testSuite = testSuites.get(name);
    if (testSuite == null) {
      testSuite = new TestSuite(name);
      testSuites.put(name, testSuite);
    }
    return testSuite;
  }
View Full Code Here

    assertSame(object, sameObject);
  }

  @Test
  public void testGetTestSuiteString() {
    final TestSuite testSuite = TestLogger.getTestSuite(TEST_SUITE_NAME);
    final TestSuite sameTestSuite = TestLogger
        .getTestSuite(TEST_SUITE_NAME);
    assertSameAndNotNull(testSuite, sameTestSuite);
  }
View Full Code Here

    assertSameAndNotNull(testSuite, sameTestSuite);
  }

  @Test
  public void testGetTestSuiteClassOfQ() {
    final TestSuite testSuite = TestLogger.getTestSuite(Integer.class);
    final TestSuite sameTestSuite = TestLogger.getTestSuite(Integer.class);
    assertSameAndNotNull(testSuite, sameTestSuite);
  }
View Full Code Here

    assertSameAndNotNull(testSuite, sameTestSuite);
  }

  @Test
  public void testGetTestSuiteObject() {
    final TestSuite testSuite = TestLogger.getTestSuite(new String());
    final TestSuite sameTestSuite = TestLogger.getTestSuite(new String());
    assertSameAndNotNull(testSuite, sameTestSuite);
  }
View Full Code Here

*/
public class Example extends junit.framework.TestCase {

  @Test
  public void test() {
    TestSuite testSuite = TestLogger.getTestSuite("My TestSuite");
    TestCase testCase = TestLogger.getTestCase("example.TestCase");
    testSuite.addTestCase(testCase);
    testCase.newTestStepGroup("Create");
    TestStep okTestStep = getOkTestStep();
    TestStep errorTestStep = getErrorTestStep();
    testCase.addTestStep(errorTestStep);
    testCase.addTestStep(okTestStep);
View Full Code Here

TOP

Related Classes of com.hamburgsud.log4testing.core.data.TestSuite

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.