Package com.hamburgsud.log4testing.core.data.attachment

Examples of com.hamburgsud.log4testing.core.data.attachment.Attachment


   * clearAttachements()
   */
  @Test
  public void testAddGetClearAttachment() {
    ArrayList<Attachment> attachments = new ArrayList<Attachment>();
    final Attachment attachment = new StringAttachment("My Attachment",
        "Hello World!", "txt");
    TestStep testStep = new TestStep();
    assertEquals(testStep.getAttachments(), attachments);
    testStep.addAttachment(attachment);
    assertEquals(testStep.getAttachments().iterator().next(), attachment);
View Full Code Here


    testCase.addTestStep(okTestStep);
    TestLogger.tearDown();
  }

  private static Attachment getDummyAttachment() {
    final Attachment attachment = new StringAttachment("My Attachment",
        "Hello World!", "txt");
    return attachment;
  }
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

  }

  private Attachment getSourcecode() {
    final String pageSource = getString(Commands.HTML_SOURCE_COMMAND,
        new String[] {});
    final Attachment attachment = new StringAttachment(
        LinkLabels.HTML_SOURCE, pageSource, FileExtensions.HTML);
    return attachment;
  }
View Full Code Here

  private Attachment getScreenshot() {
    final String base64Screenshot = getString(Commands.SCREENSHOT_COMMAND,
        new String[] {});
    final Base64 base64 = new Base64();
    final byte[] decodedScreenshot = base64.decode(base64Screenshot);
    final Attachment attachment = new BinaryAttachment(
        LinkLabels.SCREENSHOT, decodedScreenshot, FileExtensions.JPEG);
    return attachment;
  }
View Full Code Here

TOP

Related Classes of com.hamburgsud.log4testing.core.data.attachment.Attachment

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.