Skip to content

Commit a0bb0fe

Browse files
carlbraya-st
authored andcommitted
Add unit test
1 parent 4438713 commit a0bb0fe

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/test/java/hudson/plugins/performance/PerformanceReportMapTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ void testGetters() throws Exception {
5757
assertEquals("Performance", reportMap.getDisplayName());
5858
assertEquals("performance", reportMap.getUrlName());
5959
}
60+
61+
@Test
62+
void testNoPerformancePublisher() throws Exception {
63+
when(build.getParent()).thenReturn(null);
64+
PerformanceReportMap reportMap = new PerformanceReportMap(performanceBuildAction, mock(TaskListener.class));
65+
assertTrue(reportMap.ifModeThroughputUsed());
66+
assertTrue(reportMap.ifModePerformancePerTestCaseUsed());
67+
assertTrue(reportMap.ifShowTrendGraphsUsed());
68+
}
6069

6170
@Test
6271
void testRespondingTimeGraphAverageValues() throws Exception {

0 commit comments

Comments
 (0)