@Test public void shouldFailToCreateSoapSessionWithIncorrectUrl() throws Exception { settings.removeProperty(JiraConstants.SERVER_URL_PROPERTY); settings.appendProperty(JiraConstants.SERVER_URL_PROPERTY, "my.server"); thrown.expect(IllegalStateException.class); thrown.expectMessage( "The JIRA server URL is not a valid one: my.server/rpc/soap/jirasoapservice-v2"); jiraIssueCreator.createSoapSession(settings); }
@Test public void shouldCreateSoapSession() throws Exception { JiraSoapSession soapSession = jiraIssueCreator.createSoapSession(settings); assertThat(soapSession.getWebServiceUrl().toString()) .isEqualTo("http://my.jira.com/rpc/soap/jirasoapservice-v2"); }