Skip to content

Commit 9db22e2

Browse files
author
JBaruch
committed
test fix
1 parent e4ad93d commit 9db22e2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

services/src/test/java/org/jfrog/artifactory/client/ItemTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* @author jbaruch
2020
* @since 03/08/12
2121
*/
22+
@SuppressWarnings("FeatureEnvy")
2223
public class ItemTests extends ArtifactoryTestsBase {
2324

2425
protected static final String NEW_LOCAL_FROM = "new-local-from";
@@ -99,7 +100,7 @@ private void setupLocalRepo(String repoName) {
99100
artifactory.repositories().create(2, localRepository);
100101
} catch (Exception e) {
101102
//noinspection ConstantConditions
102-
if (!(e instanceof HttpResponseException) || !(((HttpResponseException) e).getStatusCode() == 404 || ((HttpResponseException) e).getStatusCode() == 405)) {
103+
if (!(e instanceof HttpResponseException) || !(((org.apache.http.client.HttpResponseException) e).getStatusCode() == 404 || ((org.apache.http.client.HttpResponseException) e).getStatusCode() == 405)) {
103104
throw e;
104105
}
105106
}
@@ -114,7 +115,7 @@ public void testSetItemPropertiesOnNonExistingDirectory() throws Exception {
114115
//should fail
115116
} catch (Exception e) {
116117
//noinspection ConstantConditions
117-
if (!(e instanceof HttpResponseException) || !(((HttpResponseException) e).getStatusCode() == 404 || ((HttpResponseException) e).getStatusCode() == 405)) {
118+
if (!(e instanceof HttpResponseException) || !(((org.apache.http.client.HttpResponseException) e).getStatusCode() == 404 || ((org.apache.http.client.HttpResponseException) e).getStatusCode() == 405)) {
118119
throw e;
119120
}
120121
}

services/src/test/java/org/jfrog/artifactory/client/RepositoryTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public void testCreate() throws Exception {
3838
@Test(dependsOnMethods = "testCreate")
3939
public void testCreateDirectory() throws IOException {
4040
Folder folder = artifactory.repository(NEW_LOCAL).folder("myFolder").create();
41-
assertEquals("/myFolder", folder.getPath());
41+
assertEquals("/myFolder/", folder.getPath());
4242
assertNotNull(folder.getCreated());
4343
}
4444

0 commit comments

Comments
 (0)