Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Nov 20, 2024
1 parent c6b3657 commit caa6cb3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void testMoveDirectory() throws Exception {
assertTrue(new MicrosoftIISDAVFindFeature(session).find(new Path(target, test.getName(), EnumSet.of(Path.Type.file))));
assertEquals(attr, new DAVAttributesFinderFeature(session).find(new Path(target, test.getName(), EnumSet.of(Path.Type.file))));
assertEquals(attr.getModificationDate(), new DAVAttributesFinderFeature(session).find(new Path(target, test.getName(), EnumSet.of(Path.Type.file))).getModificationDate());
assertEquals(attr.getETag(), new DAVAttributesFinderFeature(session).find(new Path(target, test.getName(), EnumSet.of(Path.Type.file))).getETag());
assertNotEquals(attr.getETag(), new DAVAttributesFinderFeature(session).find(new Path(target, test.getName(), EnumSet.of(Path.Type.file))).getETag());
new DAVDeleteFeature(session).delete(Collections.singletonList(target), new DisabledLoginCallback(), new Delete.DisabledCallback());
}

Expand All @@ -133,7 +133,7 @@ public void testMoveOverrideWithLock() throws Exception {
new DAVTouchFeature(session).touch(target, new TransferStatus());
assertThrows(ConflictException.class, () -> new DAVMoveFeature(session).move(test, target, new TransferStatus().exists(false), new Delete.DisabledCallback(), new DisabledConnectionCallback()));
final String lock = new DAVLockFeature(session).lock(test);
assertThrows(LockedException.class, () -> new DAVMoveFeature(session).move(test, target, new TransferStatus().exists(false), new Delete.DisabledCallback(), new DisabledConnectionCallback()));
assertThrows(ConflictException.class, () -> new DAVMoveFeature(session).move(test, target, new TransferStatus().exists(false), new Delete.DisabledCallback(), new DisabledConnectionCallback()));
new DAVMoveFeature(session).move(test, target, new TransferStatus().exists(true).withLockId(lock), new Delete.DisabledCallback(), new DisabledConnectionCallback());
assertFalse(new MicrosoftIISDAVFindFeature(session).find(test));
assertTrue(new MicrosoftIISDAVFindFeature(session).find(target));
Expand Down

0 comments on commit caa6cb3

Please sign in to comment.