File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
main/java/com/chutneytesting/jira/infra
test/java/com/chutneytesting/jira/infra Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,9 @@ public String createTestExecution(String testPlanId) {
171171
172172 @ Override
173173 public boolean isTestPlan (String issueId ) {
174+ if (issueId .isEmpty ()) {
175+ return false ;
176+ }
174177 return getIssue (issueId ).getIssueType ().getId ().equals (getIssueTypeByName ("Test Plan" ).getId ());
175178 }
176179
Original file line number Diff line number Diff line change @@ -90,6 +90,28 @@ void test_issue_as_test_plan() {
9090 .hasMessage ("Unable to get issue [PRJ-666] : " )
9191 .hasRootCauseExactlyInstanceOf (UnknownHostException .class );
9292 }
93+
94+ @ Test
95+ void test_empty_issue_as_test_plan () {
96+ // Given
97+ String issueId = "" ;
98+
99+ var config = new JiraServerConfiguration (
100+ "http://fake-server-jira" ,
101+ "user" ,
102+ "password" ,
103+ null ,
104+ "" ,
105+ ""
106+ );
107+ var sut = new HttpJiraXrayImpl (config );
108+
109+ // When
110+ boolean result = sut .isTestPlan (issueId );
111+
112+ // Then
113+ assertThat (result ).isFalse ();
114+ }
93115 }
94116
95117 @ Nested
You can’t perform that action at this time.
0 commit comments