diff options
author | Matteo Mara <matteo.mara@sonarsource.com> | 2022-09-21 11:11:06 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-09-22 20:03:32 +0000 |
commit | b8f00f77cec25c628427ec42c39481a0a30ad3f3 (patch) | |
tree | a29c42bd4f76b71c3013851ea084e11d5abe0c7f /sonar-scanner-engine/src/test/java/org/sonar/scanner | |
parent | a24eb48f4d278c38b363e1fc8d9f13c1dac6b0c4 (diff) | |
download | sonarqube-b8f00f77cec25c628427ec42c39481a0a30ad3f3.tar.gz sonarqube-b8f00f77cec25c628427ec42c39481a0a30ad3f3.zip |
SONAR-17259 Remove unsupported XML tag for generic test execution report
Diffstat (limited to 'sonar-scanner-engine/src/test/java/org/sonar/scanner')
2 files changed, 0 insertions, 31 deletions
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/deprecated/test/DefaultTestCaseTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/deprecated/test/DefaultTestCaseTest.java index 34deff51b40..b3494029539 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/deprecated/test/DefaultTestCaseTest.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/deprecated/test/DefaultTestCaseTest.java @@ -29,7 +29,6 @@ public class DefaultTestCaseTest { @Test public void getters_after_setters() { testCase - .setMessage("message") .setName("name") .setType("type") .setDurationInMs(1234L) @@ -39,6 +38,5 @@ public class DefaultTestCaseTest { assertThat(testCase.name()).isEqualTo("name"); assertThat(testCase.type()).isEqualTo("type"); assertThat(testCase.durationInMs()).isEqualTo(1234L); - assertThat(testCase.message()).isEqualTo("message"); } } diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/genericcoverage/GenericTestExecutionReportParserTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/genericcoverage/GenericTestExecutionReportParserTest.java index bf3818f3aa8..491b0c3ad93 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/genericcoverage/GenericTestExecutionReportParserTest.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/genericcoverage/GenericTestExecutionReportParserTest.java @@ -117,34 +117,6 @@ public class GenericTestExecutionReportParserTest { } @Test(expected = MessageException.class) - public void unittest_duration_in_testCase_should_be_a_number() throws Exception { - addFileToFs(setupFile("file1")); - parseUnitTestReport("<unitTest version=\"1\"><file path=\"file1\">" - + "<testCase name=\"test1\" duration=\"aaa\"/></file></unitTest>"); - } - - @Test(expected = MessageException.class) - public void unittest_failure_should_have_a_message() throws Exception { - addFileToFs(setupFile("file1")); - parseUnitTestReport("<unitTest version=\"1\"><file path=\"file1\">" - + "<testCase name=\"test1\" duration=\"2\"><failure /></testCase></file></unitTest>"); - } - - @Test(expected = MessageException.class) - public void unittest_error_should_have_a_message() throws Exception { - addFileToFs(setupFile("file1")); - parseUnitTestReport("<unitTest version=\"1\"><file path=\"file1\">" - + "<testCase name=\"test1\" duration=\"2\"><error /></testCase></file></unitTest>"); - } - - @Test(expected = MessageException.class) - public void unittest_skipped_should_have_a_message() throws Exception { - addFileToFs(setupFile("file1")); - parseUnitTestReport("<unitTest version=\"1\"><file path=\"file1\">" - + "<testCase name=\"test1\" duration=\"2\"><skipped notmessage=\"\"/></testCase></file></unitTest>"); - } - - @Test(expected = MessageException.class) public void unittest_duration_in_testCase_should_not_be_negative() throws Exception { addFileToFs(setupFile("file1")); parseUnitTestReport("<unitTest version=\"1\"><file path=\"file1\">" @@ -187,7 +159,6 @@ public class GenericTestExecutionReportParserTest { DefaultTestCase testCase = mock(DefaultTestCase.class); when(testCase.setDurationInMs(anyLong())).thenReturn(testCase); when(testCase.setStatus(any(DefaultTestCase.Status.class))).thenReturn(testCase); - when(testCase.setMessage(anyString())).thenReturn(testCase); when(testCase.setType(anyString())).thenReturn(testCase); return testCase; } |