Package org.fest.swing.junit.xml

Examples of org.fest.swing.junit.xml.XmlDocument


  private GUITestRecognizer guiTestRecognizer;
  private MyTest test;
  private ScreenshotXmlWriter writer;

  @Before public void setUp() {
    XmlDocument document = new XmlDocument();
    root = document.newRoot("root");
    errorNode = root.addNewNode("error");
    screenshotTaker = createMock(ScreenshotTaker.class);
    guiTestRecognizer = createMock(GUITestRecognizer.class);
    test = new MyTest();
    writer = new ScreenshotXmlWriter(screenshotTaker, guiTestRecognizer);
View Full Code Here


    assertThat(actual).isEqualTo(expectedXml());
    assertThat(out.closed).isFalse();
  }

  private XmlNode xml() throws Exception {
    XmlNode root = new XmlDocument().newRoot("root");
    root.addNewNode("child");
    return root;
  }
View Full Code Here

*/
public class TestXmlNodeWriter_writeTestExecutionTime_Test extends TestXmlNodeWriter_TestCase {

  @Test
  public void should_add_test_execution_time_as_attribute() {
    XmlNode root = new XmlDocument().newRoot("root");
    assertThat(writer.writeTestExecutionTime(root, currentTimeMillis() - 3000)).isSameAs(writer);
    double time = parseDouble(root.valueOfAttribute(ATTR_TIME));
    assertThat(time).isGreaterThan(0d);
  }
View Full Code Here

   * The whole test suite started. This method starts creation of the XML report.
   * @param suite the test suite.
   * @throws ExceptionInInitializerError if the underlying XML document could not be created.
   */
  public final void startTestSuite(JUnitTest suite) {
    XmlDocument document = new XmlDocument();
    xmlRoot = document.newRoot(TESTSUITE);
    suiteXmlNodeWriter.writeSuiteName(xmlRoot, suite)
                      .writeSuiteProperties(xmlRoot, suite);
    environmentXmlNodeWriter.writeHostName(xmlRoot)
                            .writeTimestamp(xmlRoot);
    onStartTestSuite(suite);
View Full Code Here

TOP

Related Classes of org.fest.swing.junit.xml.XmlDocument

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.