Package com.hamburgsud.log4testing.core.data

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


  protected static TestCase testCase;

  @BeforeClass
  public static void createTestCase() {
    testCase = new TestCase(AssertTest.class.getName());
  }
View Full Code Here


   * 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 TestCases with ErrorTestStep
   */
  @Test(expected = AssertionError.class)
  public void testAssertNotFailedTscTCAssertionError() {
    TestCase testCase1 = new TestCase("TestCase1");
    testCase1.newTestStepGroup("TestStepGroup1");
    testCase1.addTestStep(OKTestStep());
    testCase1.addTestStep(ErrorTestStep());
    Assert.assertNotFailed(testCase1);
  }
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

   */
  /**
   * Creates a TestCase with an OK TestStep
   */
  public TestCase createTCOK() {
    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.");
    testCase1.addTestStep(testStep);
    return testCase1;
  }
View Full Code Here

  public static Collection<TestSuite> getTestSuites() {
    return testSuites.values();
  }

  public static TestCase getTestCase(final String name) {
    TestCase testCase = testCases.get(name);
    if (testCase == null) {
      testCase = new TestCase(name);
      testCases.put(name, testCase);
    }
    return testCase;
  }
View Full Code Here

    assertSameAndNotNull(testSuites, sameTestSuites);
  }

  @Test
  public void testGetTestCaseString() {
    final TestCase testCase = TestLogger.getTestCase(TEST_CASE_NAME);
    final TestCase sameTestCase = TestLogger.getTestCase(TEST_CASE_NAME);
    assertSameAndNotNull(testCase, sameTestCase);
  }
View Full Code Here

    assertSameAndNotNull(testCase, sameTestCase);
  }

  @Test
  public void testGetTestCaseClassOfQ() {
    final TestCase testCase = TestLogger.getTestCase(Integer.class);
    final TestCase sameTestCase = TestLogger.getTestCase(Integer.class);
    assertSameAndNotNull(testCase, sameTestCase);
  }
View Full Code Here

    assertSameAndNotNull(testCases, sameTestCases);
  }

  @Test
  public void testGetTestCaseObject() {
    final TestCase testCase = TestLogger.getTestCase(new String());
    final TestCase sameTestCase = TestLogger.getTestCase(new String());
    assertSameAndNotNull(testCase, sameTestCase);
  }
View Full Code Here

TOP

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

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.