Package com.hamburgsud.log4testing.core.data

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


  public void testGetFirstFailed() {
    assertNull(testCase.getFirstFailed());
    testCase.newTestStep();
    assertNull(testCase.getFirstFailed());
    testCase.newTestStep();
    final TestStep firstFailed = testCase.newTestStep(TestStatus.EXCEPTION,
        "", "");
    testCase.newTestStep();
    testCase.newTestStep();
    testCase.newTestStep();
    assertSame(firstFailed, testCase.getFirstFailed());
View Full Code Here


  }

  @Test
  public void testGetStartingTime() {
    assertNull(testCase.getStartingTime());
    final TestStep testStep = testCase.newTestStep();
    assertSame(testStep.getStartingTime(), testCase.getStartingTime());
    testCase.newTestStep();
    assertSame(testStep.getStartingTime(), testCase.getStartingTime());
  }
View Full Code Here

  private void setUpTestCase() {
    testCase = new TestCase(testName);
    testCase.newTestStepGroup(testName);
    final Attachment attachment = new StringAttachment(testName, CONTENT
        + NO_SCRIPT, EXTENSION);
    testCase.addTestStep(new TestStep().addAttachment(attachment).finish());
  }
View Full Code Here

  }

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

  @Test
  public void testIsFailed() {
    assertFalse(testCase.isFailed());
    testCase.newTestStep();
    assertFalse(testCase.isFailed());
    final TestStep testStep = testCase
        .newTestStep(TestStatus.ERROR, "", "");
    assertTrue(testCase.isFailed());
    testStep.setStatus(TestStatus.OK);
    assertFalse(testCase.isFailed());
    testStep.setStatus(TestStatus.EXCEPTION);
    assertTrue(testCase.isFailed());
    testStep.setStatus(TestStatus.IGNORED);
    assertFalse(testCase.isFailed());
    testStep.setStatus(TestStatus.OK);
    assertFalse(testCase.isFailed());
  }
View Full Code Here

  }

  @Test
  public void testIsFinished() {
    assertFalse(testCase.isFinished());
    final TestStep firstTestStep = testCase.newTestStep();
    assertFalse(testCase.isFinished());
    firstTestStep.finish();
    assertTrue(testCase.isFinished());
    final TestStep secondTestStep = testCase.newTestStep();
    assertFalse(testCase.isFinished());
    secondTestStep.setStatus(TestStatus.OK);
    assertTrue(testCase.isFinished());
  }
View Full Code Here

  public TestCase getTestCase() {
    return testCase;
  }
 
  public String doCommand(final String command, String[] args) {
    final TestStep testStep = new TestStep();
    testStep.setCommand(command);
    testStep.setComment(getComment(args));
    String commandResult = "";
    try {
      commandResult = commandProcessor.doCommand(command, args);
    } catch (Exception e) {
      logException(e, testStep);
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.