File tree Expand file tree Collapse file tree
java/io/codeclou/java/junit/xml/merger Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828import org .mockito .internal .util .reflection .Whitebox ;
2929
3030import java .io .File ;
31+ import java .util .ArrayList ;
3132import java .util .Collection ;
33+ import java .util .List ;
3234
3335import static junit .framework .TestCase .assertFalse ;
3436import static org .junit .Assert .*;
@@ -42,9 +44,16 @@ private File getTestFile(String filename) {
4244
4345 @ Test
4446 public void testParseSuites () throws Exception {
47+ // GIVEN
4548 JunitXmlParser parser = new JunitXmlParser ();
49+ // WHEN
4650 Collection <TestSuite > c = parser .parseTestSuites (getTestFile ("testsuites.xml" ));
51+ List <TestSuite > l = new ArrayList <>(c );
52+ // THEN
4753 assertFalse (c .isEmpty ());
54+ assertEquals (2 , c .size ());
55+ assertEquals (l .get (0 ).getName (), "ut.io.codeclou.customfield.editor.model.rest.SortModelTestOne" );
56+ assertEquals (l .get (1 ). getName (), "ut.io.codeclou.customfield.editor.model.rest.SortModelTestTwo" );
4857 }
4958
5059 @ Test
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<testsuites >
3- <testsuite tests =" 3" failures =" 0" name =" ut.io.codeclou.customfield.editor.model.rest.SortModelTest " time =" 0.029" errors =" 0" skipped =" 0" >
3+ <testsuite tests =" 3" failures =" 0" name =" ut.io.codeclou.customfield.editor.model.rest.SortModelTestOne " time =" 0.029" errors =" 0" skipped =" 0" >
44 <testcase classname =" ut.io.codeclou.customfield.editor.model.rest.SortModelTest" name =" testIsValid" time =" 0" />
55 <testcase classname =" ut.io.codeclou.customfield.editor.model.rest.SortModelTest" name =" testToSortCollator" time =" 0.029" />
66 <testcase classname =" ut.io.codeclou.customfield.editor.model.rest.SortModelTest" name =" testIsDescending" time =" 0" />
77</testsuite >
8- <testsuite tests =" 3" failures =" 0" name =" ut.io.codeclou.customfield.editor.model.rest.SortModelTest " time =" 0.029" errors =" 0" skipped =" 0" >
8+ <testsuite tests =" 3" failures =" 0" name =" ut.io.codeclou.customfield.editor.model.rest.SortModelTestTwo " time =" 0.029" errors =" 0" skipped =" 0" >
99 <testcase classname =" ut.io.codeclou.customfield.editor.model.rest.SortModelTest" name =" testIsValid" time =" 0" />
1010 <testcase classname =" ut.io.codeclou.customfield.editor.model.rest.SortModelTest" name =" testToSortCollator" time =" 0.029" />
1111 <testcase classname =" ut.io.codeclou.customfield.editor.model.rest.SortModelTest" name =" testIsDescending" time =" 0" />
You can’t perform that action at this time.
0 commit comments