"sub/a.txt", "some text");
IFile file2 = testUtils.addFileToProject(project.getProject(),
"sub/b.txt", "some text");
resources.add(project.getProject().getFolder("sub"));
new AddToIndexOperation(resources).execute(null);
testRepository.commit("first commit");
assertEquals(file1.getLocalTimeStamp(),
testRepository.lastModifiedInIndex(file1.getLocation()
.toPortableString()));
Thread.sleep(1000);
file1.setContents(
new ByteArrayInputStream("other text".getBytes(project.project
.getDefaultCharset())), 0, null);
file2.setContents(
new ByteArrayInputStream("other text".getBytes(project.project
.getDefaultCharset())), 0, null);
assertFalse(file1.getLocalTimeStamp() == testRepository
.lastModifiedInIndex(file1.getLocation().toPortableString()));
assertFalse(file2.getLocalTimeStamp() == testRepository
.lastModifiedInIndex(file1.getLocation().toPortableString()));
new AddToIndexOperation(resources).execute(null);
assertTrue(testRepository.inIndex(file1.getLocation()
.toPortableString()));
assertTrue(testRepository.inIndex(file2.getLocation()
.toPortableString()));