@Test public void testWaitForExecutionEndAndCollectResults() throws InterruptedException { Map<String, TestClassExecutionData> testClassMap = new LinkedHashMap<>(); TestClassExecutionData executionData = new TestClassExecutionData("testID", environment); Whitebox.setInternalState(executionData, "lock", -1); Whitebox.setInternalState(executionData, "testURL", "testURL"); Whitebox.setInternalState(executionData, "countDummy", 0); Whitebox.setInternalState(executionData, "countPassed", 0); Whitebox.setInternalState(executionData, "countFailed", 0); Whitebox.setInternalState(executionData, "countNA", 0); testClassMap.put("test.class", executionData); GenericListTestSuite.setTestClassMap(testClassMap); underTest.waitForExecutionEndAndCollectResults(allTestResults, htmlLog, csvLog); verify(htmlLog).insertBlock(eq("TestRow"), Mockito.any(Properties.class)); verify(csvLog).insertBlock(eq("TestRow"), Mockito.any(Properties.class)); boolean resultOdd = (boolean) Whitebox.getInternalState(underTest, "odd"); Assert.assertTrue(resultOdd); }
public void waitForExecutionEndAndCollectResults(final AllTestResults allTestResults, final LogFileWriter htmlLog, final LogFileWriter csvLog) throws InterruptedException { odd = false; for (String s1 : GenericListTestSuite.getTestClassIds()) { TestClassExecutionData d = GenericListTestSuite.getTestClassExecutionData(s1); boolean needToWait = true; while (needToWait) { needToWait = hasToWait(allTestResults, d, htmlLog, csvLog); } } }
ResultCollector { public void waitForExecutionEndAndCollectResults(final AllTestResults allTestResults, final LogFileWriter htmlLog, final LogFileWriter csvLog) throws InterruptedException { odd = false; for (String s1 : GenericListTestSuite.getTestClassIds()) { TestClassExecutionData d = GenericListTestSuite.getTestClassExecutionData(s1); boolean needToWait = true; while (needToWait) { needToWait = hasToWait(allTestResults, d, htmlLog, csvLog); } } } }
ResultCollector { public void waitForExecutionEndAndCollectResults(final AllTestResults allTestResults, final LogFileWriter htmlLog, final LogFileWriter csvLog) throws InterruptedException { odd = false; for (String s1 : GenericListTestSuite.getTestClassIds()) { TestClassExecutionData d = GenericListTestSuite.getTestClassExecutionData(s1); boolean needToWait = true; while (needToWait) { needToWait = hasToWait(allTestResults, d, htmlLog, csvLog); } } }  }
ResultCollector { public void waitForExecutionEndAndCollectResults(final AllTestResults allTestResults, final LogFileWriter htmlLog, final LogFileWriter csvLog) throws InterruptedException { odd = false; for (String s1 : GenericListTestSuite.getTestClassIds()) { TestClassExecutionData d = GenericListTestSuite.getTestClassExecutionData(s1); boolean needToWait = true; while (needToWait) { needToWait = hasToWait(allTestResults, d, htmlLog, csvLog); } } }  void waitForExecutionEndAndCollectResults(final AllTestResults allTestResults, final LogFileWriter htmlLog, final LogFileWriter csvLog); }
ResultCollector { public void waitForExecutionEndAndCollectResults(final AllTestResults allTestResults, final LogFileWriter htmlLog, final LogFileWriter csvLog) throws InterruptedException { odd = false; for (String s1 : GenericListTestSuite.getTestClassIds()) { TestClassExecutionData d = GenericListTestSuite.getTestClassExecutionData(s1); boolean needToWait = true; while (needToWait) { needToWait = hasToWait(allTestResults, d, htmlLog, csvLog); } } }  void waitForExecutionEndAndCollectResults(final AllTestResults allTestResults, final LogFileWriter htmlLog, final LogFileWriter csvLog);  }