public static void assertAreEqual(CopyState copy1, CopyState copy2) { if (copy1 == null) { assertNull(copy2); } else { assertNotNull(copy2); assertEquals(copy1.getBytesCopied(), copy2.getBytesCopied()); assertEquals(copy1.getCompletionTime(), copy2.getCompletionTime()); assertEquals(copy1.getCopyId(), copy2.getCopyId()); assertEquals(copy1.getSource(), copy2.getSource()); assertEquals(copy1.getStatus(), copy2.getStatus()); assertEquals(copy1.getTotalBytes(), copy2.getTotalBytes()); } } }
assertEquals(source.getSnapshotQualifiedUri().getPath(), copy.getCopyState().getSource().getPath()); assertEquals(buffer.length, copy.getCopyState().getTotalBytes().intValue()); assertEquals(buffer.length, copy.getCopyState().getBytesCopied().intValue());
.getSource().getPath()); assertEquals(buffer.length, copy.getCopyState().getTotalBytes() .intValue());
assertEquals(source.getSnapshotQualifiedUri().getPath(), copy.getCopyState().getSource().getPath()); assertEquals(buffer.length, copy.getCopyState().getTotalBytes().intValue()); assertEquals(buffer.length, copy.getCopyState().getBytesCopied().intValue());
assertEquals(source.getSnapshotQualifiedUri().getPath(), copy.getCopyState().getSource().getPath()); assertEquals(data.length(), copy.getCopyState().getTotalBytes().intValue()); assertEquals(data.length(), copy.getCopyState().getBytesCopied().intValue());
assertEquals(source.getSnapshotQualifiedUri().getPath(), destination.getCopyState().getSource().getPath()); assertEquals(data.length(), destination.getCopyState().getTotalBytes().intValue()); assertEquals(data.length(), destination.getCopyState().getBytesCopied().intValue());
assertEquals(sourceUri.getSchemeSpecificPart(), copy.getCopyState().getSource().getSchemeSpecificPart()); assertTrue(buffer.length == copy.getCopyState().getTotalBytes()); assertTrue(buffer.length == copy.getCopyState().getBytesCopied());
.getSource().getPath()); assertEquals(buffer.length, copy.getCopyState().getTotalBytes() .intValue());
destination.getCopyState().getSource().getPath()); assertEquals(data.length(), destination.getCopyState().getTotalBytes().intValue()); assertEquals(data.length(), destination.getCopyState().getBytesCopied().intValue());
destination.getCopyState().getSource().getPath()); assertEquals(data.length(), destination.getCopyState().getTotalBytes().intValue()); assertEquals(data.length(), destination.getCopyState().getBytesCopied().intValue());
assertNotNull(state2.getCompletionTime()); assertEquals(state1.getCopyId(), state2.getCopyId()); assertNotNull(state2.getSource()); assertEquals(state1.getStatus(), state2.getStatus()); assertEquals(new Long(length), state2.getTotalBytes());