Skip to content

Commit

Permalink
[refactor] Address Codacy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
adamretter committed Feb 9, 2022
1 parent e0c672d commit 6df0245
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
*/
public class CDataIntergationTest {

private static final String CDATA_CONTENT = "Hello there, \"Bob?\"";
private static final String CDATA_XML = "<elem1><![CDATA[" + CDATA_CONTENT + "]]></elem1>";

@ClassRule
public static final ExistWebServer EXIST_WEB_SERVER = new ExistWebServer(true, false, true, true);

Expand All @@ -70,9 +73,6 @@ public static void cleanup() {
}
}

private static final String CDATA_CONTENT = "Hello there, \"Bob?\"";
private static final String CDATA_XML = "<elem1><![CDATA[" + CDATA_CONTENT + "]]></elem1>";

@Test
public void cdataWebDavApi() throws IOException, NotAuthorizedException, BadRequestException, HttpException, ConflictException, NotFoundException {
final String docName = "webdav-cdata-test.xml";
Expand All @@ -97,7 +97,7 @@ public void cdataWebDavApi() throws IOException, NotAuthorizedException, BadRequ
assertNotNull(folder.uploadFile(docName, tmpStoreFile, null));

// retrieve document
final com.ettrema.httpclient.Resource resource = folder.child(docName);
final Resource resource = folder.child(docName);
assertNotNull(resource);
assertTrue(resource instanceof File);
assertEquals("application/xml", ((File) resource).contentType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private void copyDocument(final String srcDocName, final String srcDocContent, f
assertNotNull(folder.uploadFile(srcDocName, tmpStoreFile, null));

// retrieve document
final com.ettrema.httpclient.Resource srcResource = folder.child(srcDocName);
final Resource srcResource = folder.child(srcDocName);
assertNotNull(srcResource);
assertTrue(srcResource instanceof File);
assertEquals(expectedMediaType, ((File) srcResource).contentType);
Expand All @@ -119,7 +119,7 @@ private void copyDocument(final String srcDocName, final String srcDocContent, f
srcResource.copyTo(folder, destDocName);

// retrieve copied document
final com.ettrema.httpclient.Resource destResource = folder.child(destDocName);
final Resource destResource = folder.child(destDocName);
assertNotNull(destResource);
assertTrue(destResource instanceof File);
assertEquals(expectedMediaType, ((File) destResource).contentType);
Expand Down

0 comments on commit 6df0245

Please sign in to comment.