void () { // enable custom mode myResultsViewer.onCustomProgressTestsCategory("foo", 4); myResultsViewer.onTestStarted(createTestProxy("some_test1", myTestsRootNode)); assertEquals(0, myResultsViewer.getFinishedTestCount()); myResultsViewer.onCustomProgressTestStarted(); assertEquals(1, myResultsViewer.getStartedTestCount()); myResultsViewer.onTestStarted(createTestProxy("some_test2", myTestsRootNode)); assertEquals(1, myResultsViewer.getStartedTestCount()); myResultsViewer.onCustomProgressTestStarted(); assertEquals(2, myResultsViewer.getStartedTestCount()); // disable custom mode myResultsViewer.onCustomProgressTestsCategory(null, 0); assertEquals(2, myResultsViewer.getStartedTestCount()); myResultsViewer.onCustomProgressTestStarted(); assertEquals(2, myResultsViewer.getStartedTestCount()); myResultsViewer.onTestStarted(createTestProxy("some_test1", myTestsRootNode)); assertEquals(3, myResultsViewer.getStartedTestCount()); assertEquals(3, myResultsViewer.getStartedTestCount()); myResultsViewer.onCustomProgressTestStarted(); assertEquals(3, myResultsViewer.getStartedTestCount()); myResultsViewer.onTestStarted(createTestProxy("some_test1", myTestsRootNode)); assertEquals(4, myResultsViewer.getStartedTestCount()); }