Package com.hamburgsud.log4testing.core.data

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


   * Tests the assertion assertOK
   */
  @Test
  public void testAssertOk() {
    testCase.newTestStepGroup("My simple Test");
    final TestStep testStep = testCase.newTestStep(TestStatus.OK,
        "mySimpleTestCommand", "This is just a simple test.",
        "Everything is working fine.");
    testStep.finish();
    Assert.assertOk(testStep);
  }
View Full Code Here


  @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

   * Creates a TestStep with TestStatus ERROR
   * @return Error TestStep
   */
  public TestStep ErrorTestStep() {
    testCase.newTestStepGroup("This is another simple Test");
    final TestStep testStep = testCase
        .newTestStep(TestStatus.ERROR, "anotherSimpleTestCommand",
            "The expected behaviour is that the status of this test step is an error.");
    return testStep;
  }
View Full Code Here

   * Creates a TestStep with TestStatus OK
   * @return
   */
  public TestStep OKTestStep() {
    testCase.newTestStepGroup("This is another simple Test");
    final TestStep testStep = testCase
        .newTestStep(TestStatus.OK, "anotherSimpleTestCommand",
            "The expected behaviour is that the status of this test step is ok.");
    return testStep;
  }
View Full Code Here

  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);
    TestLogger.tearDown();
  }
View Full Code Here

        "Hello World!", "txt");
    return attachment;
  }

  private static TestStep getErrorTestStep() {
    TestStep testStep = new TestStep();
    testStep.setStatus(TestStatus.ERROR);
    testStep.setMessage("An error occurred.");
    testStep.setCommand("errorCommand");
    testStep.addAttachment(getDummyAttachment());
    return testStep;
  }
View Full Code Here

    testStep.addAttachment(getDummyAttachment());
    return testStep;
  }

  private static TestStep getOkTestStep() {
    TestStep testStep = new TestStep();
    testStep.setStatus(TestStatus.OK);
    testStep.setComment("This test step is ok.");
    testStep.setCommand("okCommand");
    return testStep;
  }
View Full Code Here

  }

  @Test
  public void testGetFirstTestStep() {
    assertNull(testCase.getFirstTestStep());
    TestStep firstTestStep = testCase.newTestStep();
    assertSame(firstTestStep, testCase.getFirstTestStep());
    testCase.newTestStep();
    assertSame(firstTestStep, testCase.getFirstTestStep());
  }
View Full Code Here

  }

  @Test
  public void testGetLastTestStep() {
    assertNull(testCase.getLastTestStep());
    TestStep firstTestStep = testCase.newTestStep();
    assertSame(firstTestStep, testCase.getLastTestStep());
    TestStep lastTestStep = testCase.newTestStep();
    assertNotSame(firstTestStep, testCase.getLastTestStep());
    assertSame(lastTestStep, testCase.getLastTestStep());
  }
View Full Code Here

TOP

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

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.