Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
Deprecated APIs and Tests removed (fixes #16).
Browse files Browse the repository at this point in the history
  • Loading branch information
offa committed Oct 8, 2016
1 parent 6bfceae commit dd0163d
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 179 deletions.
16 changes: 0 additions & 16 deletions src/main/java/bv/offa/netbeans/cnd/unittest/api/CndTestCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,6 @@ public void setError()
trouble.setError(true);
setTrouble(trouble);
}


/**
* Sets the Test as failed.
*
* @param stackTrace Stacktrace of the failure
* @deprecated Replaced by {@link #setError(String, int)}
*/
@Deprecated
public void setError(String stackTrace[])
{
Trouble trouble = new Trouble(true);
trouble.setStackTrace(stackTrace);
setTrouble(trouble);
}



/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,7 @@ public class GoToCallstackNodeAction extends AbstractTestNodeAction
private static final long serialVersionUID = 1L;
private final CndTestCase testCase;

/** @deprecated Obsolete - will be removed */
@Deprecated
public GoToCallstackNodeAction(String actionName, String frameInfo)
{
super(actionName, null);
this.testCase = null;
}


public GoToCallstackNodeAction(String actionName, CndTestCase testCase, Project project)
{
super(actionName, project);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@ public void setUp()

}

@Deprecated
@Test
public void matchesErrorLocationLine()
{
assertTrue(handler.matches("test/TestSuite.cpp:37: error: Failure "
+ "in TEST(TestSuite, testCase)"));
}

@Test
public void parsesDataErrorLocationLine()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,28 +83,6 @@ public void setUp()
manager = mock(ManagerAdapter.class);
}

@Deprecated
@Test
public void matchesTestCaseStr()
{
assertTrue(handler.matches("TEST(TestSuite, testCase) - 8 ms"));
}

@Deprecated
@Test
public void matchesTestCaseIgnored()
{
assertTrue(handler.matches("IGNORE_TEST(TestSuite, testCase) - 7 ms"));
}

@Deprecated
@Test
public void matchesTestCaseAndDetectsNotIgnored()
{
Matcher m = checkedMatch(handler, "TEST(TestSuite, testCase) - 8 ms");
assertNull(m.group(1));
}

@Test
public void matchesTestCaseAndDetectsIgnored()
{
Expand All @@ -122,13 +100,6 @@ public void parsesDataTestCase()
assertEquals("84", m.group(5));
}

@Deprecated
@Test
public void matchesDataTestCaseWhichFailed()
{
assertTrue(handler.matches("TEST(TestSuite, testThatFailed)"));
}

@Test
public void parsesDataTestCaseWhichFailed()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@ public void setUp()
manager = mock(ManagerAdapter.class);
}

@Deprecated
@Test
public void matchesTime()
{
assertTrue(handler.matches(" - 0 ms"));
assertTrue(handler.matches(" - 123 ms"));
}

@Test
public void parsesDataTime()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,27 +61,13 @@ public void setUp()
manager = mock(ManagerAdapter.class);
}

@Deprecated
@Test
public void matchesTestSessionResult()
{
assertTrue(handler.matches("[==========] 1200 tests from 307 test cases ran. (1234 ms total)"));
}

@Test
public void parseDataTestSession()
{
Matcher m = checkedMatch(handler, "[==========] 1200 tests from 307 test cases ran. (1234 ms total)");
assertEquals("1234", m.group(1));
}

@Deprecated
@Test
public void matchesSingleTests()
{
assertTrue(handler.matches("[==========] 1 test from 1 test case ran. (3 ms total)"));
}

@Test
public void parseDataSingleTests()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ public void setUp()
manager = mock(ManagerAdapter.class);
}

@Deprecated
@Test
public void matchesSuccessfulTestSuite()
{
assertTrue(handler.matches("[----------] 3 tests from TestSuite (259 ms total)"));
}

@Test
public void parseDataSuccessfulTestSuite()
{
Expand All @@ -59,13 +52,6 @@ public void parseDataSuccessfulTestSuite()
assertEquals("259", m.group(2));
}

@Deprecated
@Test
public void matchesSingleTestSuite()
{
assertTrue(handler.matches("[----------] 1 test from TestSuite (123 ms total)"));
}

@Test
public void parseDataSingleTestSuite()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,6 @@ public void setUp()
manager = mock(ManagerAdapter.class);
}

@Deprecated
@Test
public void matchesTestSuiteStr()
{
assertTrue(handler.matches("[----------] 5 tests from TestSuite"));
}

@Test
public void parseDataTestSuite()
{
Expand All @@ -95,13 +88,6 @@ public void parseDataTestSuiteParameterized()
assertEquals("withParameterImpl/TestSuite", m.group(1));
}

@Deprecated
@Test
public void matchesSingleTestSuiteParameterized()
{
assertTrue(handler.matches("[----------] 1 test from TestSuite"));
}

@Test
public void parseDataSingleTestSuite()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,6 @@ public void setUp()
manager = mock(ManagerAdapter.class);
}

@Deprecated
@Test
public void matchesSuccessfulTestCase()
{
assertTrue(handler.matches("[ OK ] TestSuite.testCase (0 ms)"));
}

@Deprecated
@Test
public void matchesFailedTestCase()
{
assertTrue(handler.matches("[ FAILED ] TestSuite.testCase (45 ms)"));
}

@Test
public void rejectsUnknownTestCaseResult()
{
Expand Down Expand Up @@ -123,46 +109,6 @@ public void parseDataFailedTestCase()
assertEquals("45", m.group(4));
}

@Deprecated
@Test
public void updateUIThrowsIfNoTest()
{
checkedMatch(handler, "[ OK ] TestSuite.testCase (0 ms)");
exception.expect(IllegalStateException.class);
handler.updateUI((Manager) null, session);
}

@Deprecated
@Test
public void updateUIThrownsIfNotMatchingTestCase()
{
checkedMatch(handler, "[ OK ] withParameterImpl/"
+ "TestSuite.withParameter/0 (0 ms)");
createCurrentTestCase("TestSuite", "testCase", FRAMEWORK, session);
exception.expect(IllegalStateException.class);
handler.updateUI((Manager) null, session);
}

@Deprecated
@Test
public void updateUIIgnoresNotMatchingTestSuite()
{
checkedMatch(handler, "[ OK ] TestSuite.testCase (0 ms)");
createCurrentTestCase("WrongTestSuite", "testCase", FRAMEWORK, session);
exception.expect(IllegalStateException.class);
handler.updateUI((Manager) null, session);
}

@Deprecated
@Test
public void updateUIDoesNothingIfSuccessful()
{
checkedMatch(handler, "[ OK ] TestSuite.testCase (0 ms)");
CndTestCase testCase = createCurrentTestCase("TestSuite", "testCase", FRAMEWORK, session);
handler.updateUI((Manager) null, session);
assertNull(testCase.getTrouble());
}

@Test
public void updateUISetsTroubleIfFailed()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ public void setUp()
manager = mock(ManagerAdapter.class);
}

@Deprecated
@Test
public void matchesTestCaseStr()
{
assertTrue(handler.matches("[ RUN ] TestSuite.testCase"));
}

@Test
public void parseDataTestCase()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,6 @@ public void parseDataFailedTest()
assertEquals("FAIL", m.group(4));
}

@Deprecated
@Test
public void matchesIgnoredTestCase()
{
assertTrue(handler.matches("TestSuite::testExample::test ... [0s] SKIP A message"));
}

@Test
public void parseDataIgnoredTestCase()
{
Expand Down

0 comments on commit dd0163d

Please sign in to comment.