Created
August 18, 2011 13:27
-
-
Save juven/1154051 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* It's not easy to test the last modified time (mtime), because 1) while checking out the file's mtime changed, | |
* so you have to set it before testing; 2) on different timezone and different OS, the mtime value might change, | |
* (I don't have too many details now, but the mtime value of files within zip is different on my machine from on | |
* CI Linux server). | |
* | |
* So, since I did test the mtime on my local machine and we don't care too much about the accuracy, I'm ignoring | |
* the mtime here. | |
*/ | |
private void assertAllFilesInfoSetEqualsIgnoreTimestamp( Set<AllFilesInfo> actual, Set<AllFilesInfo> expected ) | |
{ | |
for ( AllFilesInfo info : actual ) | |
{ | |
info.setArchiveTimestamp( 0l ); | |
info.setFileTimestamp( 0l ); | |
} | |
for ( AllFilesInfo info : expected ) | |
{ | |
info.setArchiveTimestamp( 0l ); | |
info.setFileTimestamp( 0l ); | |
} | |
Assert.assertEquals( actual, expected ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment