Exemplo n.º 1
0
 @Test
 public void getRelativeName() throws Exception {
   File folder = this.temp.newFolder();
   File subFolder = new File(folder, "A");
   File file = new File(subFolder, "B.txt");
   ChangedFile changedFile = new ChangedFile(folder, file, Type.ADD);
   assertThat(changedFile.getRelativeName()).isEqualTo("A/B.txt");
 }
Exemplo n.º 2
0
 @Test
 public void getType() throws Exception {
   ChangedFile changedFile =
       new ChangedFile(this.temp.newFolder(), this.temp.newFile(), Type.DELETE);
   assertThat(changedFile.getType()).isEqualTo(Type.DELETE);
 }
Exemplo n.º 3
0
 @Test
 public void getFile() throws Exception {
   File file = this.temp.newFile();
   ChangedFile changedFile = new ChangedFile(this.temp.newFolder(), file, Type.ADD);
   assertThat(changedFile.getFile()).isEqualTo(file);
 }