Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
269,000 | void () { ChangeSet cs1 = addChangeSet(facade, createDirectory(r, "dir")); ChangeSet cs2 = addChangeSet(facade, createFile(r, "dir/file")); ChangeSet cs3 = addChangeSet(facade, delete(r, "dir")); ChangeSet cs4 = addChangeSet(facade, createDirectory(r, "dir")); ChangeSet cs5 = addChangeSet(facade, createFile(r, "dir/fil... | testChangesForRestoredDirectoryWithRestoredChildren |
269,001 | void () { ChangeSet cs1 = addChangeSet(facade, createFile(r, "f1")); ChangeSet cs2 = addChangeSet(facade, delete(r, "f1")); ChangeSet cs3 = addChangeSet(facade, createFile(r, "f2")); assertEquals(array(cs3), getChangesFor("f2")); } | testChangesForFileIfThereWereSomeDeletedFilesBeforeItsCreation |
269,002 | void () { ChangeSet cs1 = addChangeSet(facade, createFile(r, "f")); ChangeSet cs2 = addChangeSet(facade, delete(r, "f")); ChangeSet cs3 = addChangeSet(facade, createFile(r, "f"), delete(r, "f")); ChangeSet cs4 = addChangeSet(facade, createFile(r, "f")); assertEquals(array(cs4, cs3, cs2, cs1), getChangesFor("f")); } | testDoesNotIncludeChangeSetIfFileWasRestoredAndDeletedInOneChangeSet |
269,003 | void () { ChangeSet cs1 = addChangeSet(facade, createFile(r, "f")); ChangeSet cs2 = addChangeSet(facade, new PutLabelChange(nextId(), "label", "project")); assertEquals(array(cs2, cs1), getChangesFor("f")); } | testIncludingChangeSetsWithLabelsInside |
269,004 | void () { ChangeSet cs1 = addChangeSet(facade, createFile(r, "f")); ChangeSet cs2 = addChangeSet(facade, changeContent(r, "f", null, -1), new PutLabelChange(nextId(), "label", "project"), changeContent(r, "f", null, -1)); assertEquals(array(cs2, cs1), getChangesFor("f")); } | testDoesNotSplitChangeSetsWithLabelsInside |
269,005 | void () { ChangeSet cs1 = addChangeSet(facade, createFile(r, "file")); ChangeSet cs2 = addChangeSet(facade, delete(r, "file")); ChangeSet cs3 = addChangeSet(facade, new PutLabelChange(nextId(), "", "project")); ChangeSet cs4 = addChangeSet(facade, createFile(r, "file")); assertEquals(array(cs4, cs2, cs1), getChangesFor... | testDoesNotIncludeChangesMadeBetweenDeletionAndRestore |
269,006 | void () { ChangeSet cs1 = addChangeSet(facade, createDirectory(r, "dir")); ChangeSet cs2 = addChangeSet(facade, createFile(r, "dir/file")); ChangeSet cs3 = addChangeSet(facade, delete(r, "dir/file")); assertEquals(array(cs3, cs2, cs1), getChangesFor("dir")); } | testDoesNotIgnoreDeletionOfChildren |
269,007 | void () { ChangeSet cs1 = addChangeSet(facade, createDirectory(r, "dir1")); ChangeSet cs2 = addChangeSet(facade, createDirectory(r, "dir1/dir2")); ChangeSet cs3 = addChangeSet(facade, createFile(r, "dir1/dir2/file")); ChangeSet cs4 = addChangeSet(facade, delete(r, "dir1/dir2/file")); ChangeSet cs5 = addChangeSet(facade... | testChangesForRestoredFileWhenParentWasDeletedAfterDeletionOfTheFile |
269,008 | void () { ChangeSet cs1 = addChangeSet(facade, createDirectory(r, "dir"), createFile(r, "dir/file")); ChangeSet cs2 = addChangeSet(facade, delete(r, "dir/file"), delete(r, "dir")); ChangeSet cs3 = addChangeSet(facade, createDirectory(r, "dir"), createFile(r, "dir/file"), delete(r, "dir/file"), delete(r, "dir")); Change... | testDoesNotIncludeChangesIfFileAndItsParentWasDeletedAndRestoredInOneChangeSet |
269,009 | void () { ChangeSet cs1 = addChangeSet(facade, createDirectory(r, "dir")); ChangeSet cs2 = addChangeSet(facade, createFile(r, "dir/FooBar")); ChangeSet cs3 = addChangeSet(facade, createFile(r, "dir/BarBaz")); assertEquals(array(cs2), getChangesFor("dir", "f")); assertEquals(array(cs2), getChangesFor("dir", "foo")); ass... | testFilteredChanges |
269,010 | void () { ChangeSet cs1 = addChangeSet(facade, createDirectory(r, "dir")); ChangeSet cs2 = addChangeSet(facade, createFile(r, "dir/FooBar")); ChangeSet cs3 = addChangeSet(facade, createFile(r, "dir/BarBaz")); assertEquals(array(cs2), getChangesFor("dir", "f")); assertEquals(array(cs2), getChangesFor("dir", "foo")); ass... | testFilteredChangesDoesnTIncludeChanges |
269,011 | List<ChangeSet> (String path) { return getChangesFor(path, null); } | getChangesFor |
269,012 | List<ChangeSet> (String path, String pattern) { return collectChanges(facade, path, "project", pattern); } | getChangesFor |
269,013 | void () { addChangeSet(facade, "1", createFile(r, "file1")); addChangeSet(facade, "2", createFile(r, "file2")); RootEntry copy = r.copy(); facade.revertUpTo(copy, "", facade.getChangeListInTests().getChangesInTests().get(0), null, true, true); assertTrue(copy.hasEntry("file1")); assertFalse(copy.hasEntry("file2")); cop... | testRevertionUpToInclusively |
269,014 | void () { addChangeSet(facade, "1", createFile(r, "file1")); addChangeSet(facade, "2", createFile(r, "file2")); RootEntry copy = r.copy(); facade.revertUpTo(copy, "", facade.getChangeListInTests().getChangesInTests().get(0), null, false, true); assertTrue(copy.hasEntry("file1")); assertTrue(copy.hasEntry("file2")); cop... | testRevertionUpToExclusively |
269,015 | void () { add(facade, createFile(r, "file1")); add(facade, createFile(r, "file2")); add(facade, rename(r, "file2", "file3")); RootEntry copy = r.copy(); assertEquals("file3", facade.revertUpTo(copy, "file3", facade.getChangeListInTests().getChangesInTests().get(0), null, false, true)); assertTrue(copy.hasEntry("file1")... | testRevertionUpToWithTrackingPath |
269,016 | void () { add(facade, createDirectory(r, "root")); add(facade, createDirectory(r, "root/dir1")); add(facade, rename(r, "root/dir1", "dir2")); add(facade, delete(r, "root/dir2")); add(facade, createDirectory(r, "root/dir2")); add(facade, rename(r, "root", "root2")); RootEntry copy = r.copy(); assertEquals("root/dir2", f... | testRevertionUpToWithTrackingPathWithDeletionAndMovements |
269,017 | void () { facade.beginChangeSet(); StructuralChange c1 = add(facade, createFile(r, "f1")); StructuralChange c2 = add(facade, createFile(r, "f2")); facade.endChangeSet("changeSet"); List<ChangeSet> cc = facade.getChangeListInTests().getChangesInTests(); assertEquals(1, cc.size()); assertEquals("changeSet", cc.get(0).get... | testChangeSet |
269,018 | void () { facade.beginChangeSet(); add(facade, createFile(r, "f1")); facade.beginChangeSet(); add(facade, createFile(r, "f2")); facade.forceBeginChangeSet(); add(facade, createFile(r, "f3")); facade.endChangeSet("a"); add(facade, createFile(r, "f4")); facade.endChangeSet("b"); add(facade, createFile(r, "f5")); facade.e... | testForcesBegin |
269,019 | void () { setCurrentTimestamp(123); facade.beginChangeSet(); add(facade, createFile(r, "f")); setCurrentTimestamp(456); facade.endChangeSet(null); assertEquals(123, facade.getChangeListInTests().getChangesInTests().get(0).getTimestamp()); } | testChangeSetTimestamp |
269,020 | void () { facade.beginChangeSet(); facade.endChangeSet(null); assertTrue(facade.getChangeListInTests().getChangesInTests().isEmpty()); } | testSkippingEmptyChangeSets |
269,021 | void () { facade.beginChangeSet(); Change c1 = add(facade, createFile(r, "f1")); facade.beginChangeSet(); Change c2 = add(facade, createFile(r, "f2")); facade.endChangeSet("inner"); facade.endChangeSet("outer"); List<ChangeSet> cc = facade.getChangeListInTests().getChangesInTests(); assertEquals(1, cc.size()); assertEq... | testSkippingInnerChangeSets |
269,022 | void () { ChangeSet cs1 = cs(new CreateFileChange(nextId(), "file")); ChangeSet cs2 = cs(new CreateDirectoryChange(nextId(), "dir")); assertTrue(cs1.isCreationalFor("file")); assertTrue(cs2.isCreationalFor("dir")); assertFalse(cs1.isCreationalFor("dir")); } | testIsCreational |
269,023 | void () { ChangeSet cs = cs(new ContentChange(nextId(), "file", null, -1)); assertFalse(cs.isCreationalFor("file")); } | testNonCreational |
269,024 | void () { ChangeSet cs = cs(new CreateFileChange(nextId(), "file"), new ContentChange(nextId(), "file", null, -1)); assertTrue(cs.isCreationalFor("file")); } | testCreationalAndNonCreationalInOneChangeSet |
269,025 | void () { ChangeSet cs = cs(new CreateFileChange(nextId(), "file"), new CreateDirectoryChange(nextId(), "dir")); assertTrue(cs.isCreationalFor("file")); assertTrue(cs.isCreationalFor("dir")); } | testToCreationalChangesInOneChangeSet |
269,026 | void () { assertFalse(cs(new CreateFileChange(nextId(), "f")).isContentChangeOnly()); assertTrue(cs(new ContentChange(nextId(), "f", null, -1)).isContentChangeOnly()); assertFalse(cs(new ContentChange(nextId(), "f1", null, -1), new ContentChange(nextId(), "f2", null, -1)).isContentChangeOnly()); assertFalse(cs(new Crea... | testIsFileContentChange |
269,027 | void () { StructuralChange c = createFile(root, "file"); assertTrue(root.hasEntry("file")); c.revertOn(root, true); assertFalse(root.hasEntry("file")); } | testCreatingFile |
269,028 | void () { StructuralChange c = createDirectory(root, "dir"); assertTrue(root.hasEntry("dir")); c.revertOn(root, true); assertFalse(root.hasEntry("dir")); } | testCreatingDirectory |
269,029 | void () { StructuralChange c = createFile(root, "dir/file", null, -1, false); c.revertOn(root, true); assertFalse(root.hasEntry("dir/file")); assertTrue(root.hasEntry("dir")); } | testCreatingFileUnderDirectory |
269,030 | void () { createFile(root, "file", "old content", 11L, false); StructuralChange c = changeContent(root, "file", "new content", 22L); c.revertOn(root, true); Entry e = root.getEntry("file"); assertContent("old content", e.getContent()); assertEquals(11L, e.getTimestamp()); } | testChangingFileContent |
269,031 | void () { createFile(root, "file"); StructuralChange c = rename(root, "file", "new file"); assertTrue(root.hasEntry("new file")); c.revertOn(root, true); assertTrue(root.hasEntry("file")); assertFalse(root.hasEntry("new file")); } | testRenamingFile |
269,032 | void () { createFile(root, "dir1/dir2/file"); StructuralChange c = rename(root, "dir1/dir2", "new dir"); assertFalse(root.hasEntry("dir1/dir2/file")); assertTrue(root.hasEntry("dir1/new dir/file")); c.revertOn(root, true); assertTrue(root.hasEntry("dir1/dir2")); assertTrue(root.hasEntry("dir1/dir2/file")); assertFalse(... | testRenamingDirectoryWithContent |
269,033 | void () { createFile(root, "f", null, -1, true); StructuralChange c = changeROStatus(root, "f", false); assertFalse(root.getEntry("f").isReadOnly()); c.revertOn(root, true); assertTrue(root.getEntry("f").isReadOnly()); } | testChangingFileROStatus |
269,034 | void () { createDirectory(root, "dir1"); createDirectory(root, "dir2"); createFile(root, "dir1/file"); StructuralChange c = move(root, "dir1/file", "dir2"); assertTrue(root.hasEntry("dir2/file")); assertFalse(root.hasEntry("dir1/file")); c.revertOn(root, true); assertFalse(root.hasEntry("dir2/file")); assertTrue(root.h... | testMovingFileFromOneDirectoryToAnother |
269,035 | void () { createFile(root, "root1/dir/file"); createDirectory(root, "root2"); StructuralChange c = move(root, "root1/dir", "root2"); assertTrue(root.hasEntry("root2/dir")); assertTrue(root.hasEntry("root2/dir/file")); assertFalse(root.hasEntry("root1/dir")); c.revertOn(root, true); assertTrue(root.hasEntry("root1/dir")... | testMovingDirectory |
269,036 | void () { createFile(root, "file", "content", 18L, true); StructuralChange c = delete(root, "file"); assertFalse(root.hasEntry("file")); c.revertOn(root, true); assertTrue(root.hasEntry("file")); Entry e = root.getEntry("file"); assertContent("content", e.getContent()); assertEquals(18L, e.getTimestamp()); assertTrue(e... | testDeletingFile |
269,037 | void () { createFile(root, "file"); DeleteChange c = delete(root, "file"); assertFalse(root.hasEntry("file")); c.revertOn(root, true); assertTrue(root.hasEntry("file")); Entry restored = root.findEntry("file"); assertNotSame(restored, c.getDeletedEntry()); c.getDeletedEntry().setName("fff"); assertEquals("file", restor... | testDeletionRevertionCopiesRestoredEntry |
269,038 | void () { createFile(root, "dir1/dir2/file", "content", -1, false); StructuralChange c = delete(root, "dir1"); assertFalse(root.hasEntry("dir1")); c.revertOn(root, true); assertTrue(root.hasEntry("dir1")); assertTrue(root.hasEntry("dir1/dir2")); assertTrue(root.hasEntry("dir1/dir2/file")); assertContent("content", root... | testDeletingDirectoryWithContent |
269,039 | void () { assertFalse(root.hasEntry("dir")); createDirectory(root, "dir"); assertTrue(root.hasEntry("dir")); Entry e = root.getEntry("dir"); assertEquals(DirectoryEntry.class, e.getClass()); assertTrue(e.getChildren().isEmpty()); } | testCeatingDirectory |
269,040 | void () { createDirectory(root, "dir"); createFile(root, "dir/file"); assertTrue(root.hasEntry("dir")); assertTrue(root.hasEntry("dir/file")); Entry dir = root.getEntry("dir"); Entry file = root.getEntry("dir/file"); assertEquals(1, dir.getChildren().size()); assertSame(file, dir.getChildren().get(0)); assertSame(dir, ... | testCreatingFilesUnderDirectory |
269,041 | void () { createFile(root, "dir/file"); assertTrue(root.hasEntry("dir")); assertTrue(root.hasEntry("dir/file")); } | testCreatingFilesUnderNonExistingDirectoryCreatesIt |
269,042 | void () { createDirectory(root, "dir"); createFile(root, "dir/file", "content"); changeContent(root, "dir/file", "new content"); assertContent("new content", root.getEntry("dir/file").getContent()); } | testChangingFileContentUnderDirectory |
269,043 | void () { createFile(root, "dir"); rename(root, "dir", "new dir"); assertTrue(root.hasEntry("new dir")); assertFalse(root.hasEntry("dir")); } | testRenamingDirectories |
269,044 | void () { createDirectory(root, "dir"); createFile(root, "dir/file", "content"); rename(root, "dir/file", "new file"); assertFalse(root.hasEntry("dir/file")); assertTrue(root.hasEntry("dir/new file")); assertContent("content", root.getEntry("dir/new file").getContent()); } | testRenamingFilesUnderDirectory |
269,045 | void () { createDirectory(root, "dir"); createFile(root, "dir/file1"); createFile(root, "dir/file2"); try { rename(root, "dir/file1", "file2"); fail(); } catch (RuntimeException e) { } } | testRenamingFilesUnderDirectoryToExistingNameThrowsException |
269,046 | void () { createDirectory(root, "dir1"); createFile(root, "dir1/dir2"); rename(root, "dir1/dir2", "new dir"); assertTrue(root.hasEntry("dir1/new dir")); assertFalse(root.hasEntry("dir1/dir2")); } | testRenamingSubdirectories |
269,047 | void () { createDirectory(root, "dir"); createFile(root, "dir/file"); rename(root, "dir", "new dir"); assertTrue(root.hasEntry("new dir")); assertTrue(root.hasEntry("new dir/file")); assertFalse(root.hasEntry("dir")); assertFalse(root.hasEntry("dir/file")); } | testRenamingDirectoryWithContent |
269,048 | void () { createDirectory(root, "dir1"); createDirectory(root, "dir1/dir2"); createFile(root, "dir1/file"); try { rename(root, "dir1/dir2", "file"); fail(); } catch (RuntimeException e) { } } | testRenamingDirectoryToExistingFileNameThrowsException |
269,049 | void () { createDirectory(root, "dir1"); createDirectory(root, "dir2"); createFile(root, "dir1/file", "content"); move(root, "dir1/file", "dir2"); assertTrue(root.hasEntry("dir2/file")); assertFalse(root.hasEntry("dir1/file")); Entry e = root.getEntry("dir2/file"); assertContent("content", e.getContent()); } | testMovingFilesBetweenDirectories |
269,050 | void () { createDirectory(root, "root1"); createDirectory(root, "root2"); createDirectory(root, "root1/dir"); createFile(root, "root1/dir/file"); move(root, "root1/dir", "root2"); assertTrue(root.hasEntry("root2/dir")); assertTrue(root.hasEntry("root2/dir/file")); assertFalse(root.hasEntry("root1/dir")); } | testMovingDirectories |
269,051 | void () { createDirectory(root, "dir"); createFile(root, "file"); move(root, "file", "dir"); assertTrue(root.hasEntry("dir/file")); assertFalse(root.hasEntry("file")); } | testMovingEntryFromRootToDirectory |
269,052 | void () { createDirectory(root, "dir1"); createDirectory(root, "dir1/dir2"); createFile(root, "dir1/file1"); createFile(root, "dir1/dir2/file2"); move(root, "dir1/file1", "dir1/dir2"); move(root, "dir1/dir2/file2", "dir1"); assertTrue(root.hasEntry("dir1/file2")); assertTrue(root.hasEntry("dir1/dir2/file1")); } | testMovingEntriesToAnotherLevelInTree |
269,053 | void () { createDirectory(root, "dir1"); createDirectory(root, "dir1/dir2"); try { move(root, "dir1", "dir1/dir2"); fail(); } catch (RuntimeException e) { } } | testMovingDirectoryToItsChildThrowsException |
269,054 | void () { createFile(root, "file1"); createFile(root, "file2"); try { move(root, "file1", "file1/file2"); fail(); } catch (RuntimeException e) { } } | testMovingEntryToNotADirectoryThrowsException |
269,055 | void () { createDirectory(root, "dir"); createFile(root, "dir/file"); move(root, "dir/file", "dir"); assertTrue(root.hasEntry("dir/file")); } | testMovingEntryToSameDirectory |
269,056 | void () { createDirectory(root, "dir"); assertTrue(root.hasEntry("dir")); delete(root, "dir"); assertFalse(root.hasEntry("dir")); } | testDeletingDirectory |
269,057 | void () { createDirectory(root, "dir1"); createDirectory(root, "dir1/dir2"); assertTrue(root.hasEntry("dir1")); assertTrue(root.hasEntry("dir1/dir2")); delete(root, "dir1/dir2"); assertFalse(root.hasEntry("dir1/dir2")); assertTrue(root.hasEntry("dir1")); } | testDeletingSubdirectory |
269,058 | void () { createDirectory(root, "dir1"); createDirectory(root, "dir1/dir2"); delete(root, "dir1"); assertFalse(root.hasEntry("dir1/dir2")); assertFalse(root.hasEntry("dir1")); } | testDeletingDirectoryWithContent |
269,059 | void () { createDirectory(root, "dir"); createFile(root, "dir/file"); assertTrue(root.hasEntry("dir/file")); delete(root, "dir/file"); assertFalse(root.hasEntry("dir/file")); } | testDeletingFilesUnderDirectory |
269,060 | void () { createFile(root, "f", "old"); Change c = changeContent(root, "f", "new"); List<Content> cc = c.getContentsToPurge(); assertEquals(1, cc.size()); assertContent("old", cc.get(0)); } | testChangeFileContentChange |
269,061 | void () { createFile(root, "f", "content"); Change c = delete(root, "f"); List<Content> cc = c.getContentsToPurge(); assertEquals(1, cc.size()); assertContent("content", cc.get(0)); } | testDeleteFileChange |
269,062 | void () { createDirectory(root, "dir"); createDirectory(root, "dir/subDir"); createFile(root, "dir/file", "one"); createFile(root, "dir/subDir/file1", "two"); createFile(root, "dir/subDir/file2", "three"); Change c = delete(root, "dir"); List<Content> cc = c.getContentsToPurge(); assertEquals(3, cc.size()); assertTrue(... | testDeleteDirectoryWithFilesChange |
269,063 | void () { Change c1 = createFile(root, "file", "content"); Change c2 = createDirectory(root, "dir"); Change c3 = move(root, "file", "dir"); Change c4 = rename(root, "dir/file", "newFile"); assertTrue(c1.getContentsToPurge().isEmpty()); assertTrue(c2.getContentsToPurge().isEmpty()); assertTrue(c3.getContentsToPurge().is... | testOtherChanges |
269,064 | void () { FileEntry e = new FileEntry("file", null, -1, false); root.addChild(e); assertSame(e, root.findEntry("file")); } | testFindingEntry |
269,065 | void () { assertNull(root.findEntry("unknown entry")); assertNull(root.findEntry("root/unknown entry")); } | testDoesNotFindUnknownEntry |
269,066 | void () { DirectoryEntry dir = new DirectoryEntry("dir"); FileEntry file = new FileEntry("file", null, -1, false); dir.addChild(file); root.addChild(dir); assertSame(dir, root.findEntry("dir")); assertSame(file, root.findEntry("dir/file")); assertNull(root.findEntry("dir/another")); } | testFindingEntryUnderDirectory |
269,067 | void () { root = new RootEntry(); Entry dir = new DirectoryEntry("dir"); Entry file1 = new FileEntry("file1", null, -1, false); Entry file2 = new FileEntry("file2", null, -1, false); root.addChild(dir); root.addChild(file1); dir.addChild(file2); assertSame(dir, root.findEntry("dir")); assertSame(file1, root.findEntry("... | testFindingEntriesInTree |
269,068 | void () { Entry dir1 = new DirectoryEntry("c:"); Entry dir2 = new DirectoryEntry("d:"); Entry file1 = new FileEntry("file1", null, -1, false); Entry file2 = new FileEntry("file2", null, -1, false); dir1.addChild(file1); dir2.addChild(file2); root.addChild(dir1); root.addChild(dir2); assertSame(dir1, root.findEntry("c:"... | testFindingUnderRoots |
269,069 | void () { Entry d1 = new DirectoryEntry("dir"); Entry d2 = new DirectoryEntry("dir2"); Entry f = new FileEntry("file", null, -1, false); root.addChild(d1); root.addChild(d2); d2.addChild(f); assertSame(f, root.findEntry("dir2/file")); assertNull(root.findEntry("dir/file")); } | testNamesOfDirectoriesBeginningWithTheSameString |
269,070 | void () { Entry f1 = new FileEntry("file1", null, -1, false); Entry f2 = new FileEntry("file", null, -1, false); root.addChild(f1); root.addChild(f2); assertSame(f1, root.findEntry("file1")); assertSame(f2, root.findEntry("file")); } | testNamesOfEntriesBeginningWithSameStringAndLongerOneIsTheFirst |
269,071 | void () { root.addChild(new FileEntry("file", null, -1, false)); Paths.setCaseSensitive(true); assertNull(root.findEntry("FiLe")); assertNotNull(root.findEntry("file")); Paths.setCaseSensitive(false); assertNotNull(root.findEntry("FiLe")); assertNotNull(root.findEntry("file")); } | testFindingIsRelativeToFileSystemCaseSensivity |
269,072 | void () { try { root.getEntry("unknown entry"); fail(); } catch (RuntimeException e) { assertEquals("entry 'unknown entry' not found", e.getMessage()); } } | testGettingUnknownEntryThrowsException |
269,073 | void () { Entry dir = new DirectoryEntry(null); Entry file = new FileEntry(null, null, -1, false); dir.addChild(file); assertEquals(1, dir.getChildren().size()); assertSame(file, dir.getChildren().get(0)); assertSame(dir, file.getParent()); } | testAddingChildren |
269,074 | void () { Entry dir = new DirectoryEntry("dir"); dir.addChild(new FileEntry("child", null, -1, false)); Paths.setCaseSensitive(true); try { dir.addChild(new FileEntry("CHILD", null, -1, false)); } catch (RuntimeException e) { fail(); } try { dir.addChild(new FileEntry("child", null, -1, false)); fail(); } catch (Runtim... | testAddingExistentChildThrowsException |
269,075 | void () { Entry dir = new DirectoryEntry(null); Entry file = new FileEntry(null, null, -1, false); dir.addChild(file); assertFalse(dir.getChildren().isEmpty()); dir.removeChild(file); assertTrue(dir.getChildren().isEmpty()); assertNull(file.getParent()); } | testRemovingChildren |
269,076 | void () { Entry dir = new DirectoryEntry(null); Entry one = new FileEntry("one", null, -1, false); Entry two = new FileEntry("two", null, -1, false); dir.addChild(one); dir.addChild(two); assertSame(one, dir.findChild("one")); assertSame(two, dir.findChild("two")); assertNull(dir.findChild("aaa")); Paths.setCaseSensiti... | testFindChild |
269,077 | void () { DirectoryEntry dir = new DirectoryEntry(null); Entry file1 = new FileEntry("file1", null, -1, false); Entry file2 = new FileEntry("file2", null, -1, false); Entry dir1 = new DirectoryEntry("dir1"); dir.addChild(file1); dir.addChild(file2); dir.addChild(dir1); assertSame(file1, dir.findDirectChild("file1", fal... | testChildById |
269,078 | void () { Entry dir = new DirectoryEntry("dir"); Entry file = new FileEntry("file", null, -1, false); dir.addChild(file); assertEquals("dir/file", file.getPath()); } | testPath |
269,079 | void () { assertEquals("dir", new DirectoryEntry("dir").getPath()); assertEquals("file", new FileEntry("file", null, -1, false).getPath()); } | testPathWithoutParent |
269,080 | void () { Entry dir = new DirectoryEntry("name"); Entry copy = dir.copy(); assertEquals("name", copy.getPath()); } | testCopyingWithContent |
269,081 | void () { Entry parent = new DirectoryEntry(null); Entry dir = new DirectoryEntry(null); parent.addChild(dir); assertNull(dir.copy().getParent()); } | testDoesNotCopyParent |
269,082 | void () { Entry dir = new DirectoryEntry(null); Entry child1 = new FileEntry("child1", null, -1, false); Entry child2 = new DirectoryEntry("child2"); Entry child3 = new FileEntry("child3", null, -1, false); dir.addChild(child1); dir.addChild(child2); child2.addChild(child3); Entry copy = dir.copy(); List<Entry> childre... | testCopyingContentRecursively |
269,083 | void () { Entry dir = new DirectoryEntry(null); Entry child1 = new FileEntry("child1", null, -1, false); Entry child2 = new DirectoryEntry("child2"); Entry child3 = new FileEntry("child3", null, -1, false); dir.addChild(child1); dir.addChild(child2); child2.addChild(child3); dir.copy(); assertSame(dir, child1.getParent... | testCopyingContentDoesNotChangeOriginalStructure |
269,084 | void () { Entry e = new DirectoryEntry("name"); e.setName("new name"); assertEquals("new name", e.getName()); } | testRenaming |
269,085 | void () { Entry dir = new DirectoryEntry("dir"); Entry child = new FileEntry("child", null, -1, false); dir.addChild(child); child.setName("new name"); assertEquals("new name", child.getName()); } | testRenamingChildToNonExistentNameDoesNotThrowException |
269,086 | void () { Entry dir = new DirectoryEntry("dir"); Entry child1 = new FileEntry("child1", null, -1, false); Entry child2 = new FileEntry("child2", null, -1, false); dir.addChild(child1); dir.addChild(child2); try { child1.setName("child2"); fail(); } catch (RuntimeException e) { } } | testRenamingChildToExistingNameThrowsException |
269,087 | void () { Entry dir = new DirectoryEntry("dir"); assertHasNoUnavailableContent(dir); dir.addChild(new FileEntry("f", c("abc"), -1, false)); assertHasNoUnavailableContent(dir); FileEntry f1 = new FileEntry("f1", new StoredContent(-1), -1, false); FileEntry f2 = new FileEntry("f2", new StoredContent(-1), -1, false); Dire... | testHasUnavailableContent |
269,088 | void (Entry dir) { List<Entry> ee = new ArrayList<>(); assertFalse(dir.hasUnavailableContent(ee)); assertTrue(ee.isEmpty()); } | assertHasNoUnavailableContent |
269,089 | void (Entry dir, Entry... entries) { List<Entry> ee = new ArrayList<>(); assertTrue(dir.hasUnavailableContent(ee)); assertEquals(entries, ee); } | assertHasUnavailableContent |
269,090 | void () { DirectoryEntry e1 = new DirectoryEntry("name"); DirectoryEntry e2 = new DirectoryEntry("name"); assertTrue(Entry.getDifferencesBetween(e1, e2).isEmpty()); } | testNoDifference |
269,091 | void () { DirectoryEntry e1 = new DirectoryEntry("name"); DirectoryEntry e2 = new DirectoryEntry("another name"); List<Difference> dd = Entry.getDifferencesBetween(e1, e2); assertEquals(1, dd.size()); assertDirDifference(dd.get(0), e1, e2); } | testDifferenceInName |
269,092 | void () { DirectoryEntry e1 = new DirectoryEntry("name"); DirectoryEntry e2 = new DirectoryEntry("NAME"); Paths.setCaseSensitive(false); assertEquals(1, Entry.getDifferencesBetween(e1, e2).size()); Paths.setCaseSensitive(true); assertEquals(1, Entry.getDifferencesBetween(e1, e2).size()); } | testDifferenceInNameIsAlwaysCaseSensitive |
269,093 | void () { DirectoryEntry e1 = new DirectoryEntry("dir"); Content content = c("content"); final String name = "name"; final String name_v2 = "NAME"; final String name2 = "Name2"; final String name2_v2 = "name2"; e1.addChild(new FileEntry(name, content, -1, false)); e1.addChild(new FileEntry(name2, content, -1, false)); ... | testCaseInsensitiveChildrenDiffProcessing |
269,094 | void () { Entry e1 = new DirectoryEntry("name"); Entry e2 = new DirectoryEntry("name"); Entry child = new FileEntry("name", c("content"), -1, false); e2.addChild(child); List<Difference> dd = Entry.getDifferencesBetween(e1, e2); assertEquals(1, dd.size()); assertFileDifference(dd.get(0), null, child); } | testDifferenceWithCreatedChild |
269,095 | void () { Entry dir1 = new DirectoryEntry("name"); Entry dir2 = new DirectoryEntry("name"); Entry subDir = new DirectoryEntry("subDir"); Entry subSubFile = new FileEntry("subSubFile", null, -1, false); dir2.addChild(subDir); subDir.addChild(subSubFile); List<Difference> dd = Entry.getDifferencesBetween(dir1, dir2); ass... | testDifferenceWithCreatedChildWithSubChildren |
269,096 | void () { Entry dir1 = new DirectoryEntry("name"); Entry dir2 = new DirectoryEntry("name"); Entry subDir = new DirectoryEntry("subDir"); Entry subSubFile = new FileEntry("subSubFile", null, -1, false); dir1.addChild(subDir); subDir.addChild(subSubFile); List<Difference> dd = Entry.getDifferencesBetween(dir1, dir2); ass... | testDifferenceWithDeletedChild |
269,097 | void () { Entry e1 = new DirectoryEntry("name"); Entry e2 = new DirectoryEntry("name"); Entry child1 = new FileEntry("name1", c("content1"), -1, false); Entry child2 = new FileEntry("name1", c("content2"), -1, false); e1.addChild(child1); e2.addChild(child2); List<Difference> dd = Entry.getDifferencesBetween(e1, e2); a... | testDifferenceWithModifiedChild |
269,098 | void () { Entry e1 = new DirectoryEntry("name"); Entry e2 = new DirectoryEntry("name"); e1.addChild(new FileEntry("name", c("content"), -1, false)); e1.addChild(new FileEntry("another name", c("content"), -1, false)); e2.addChild(new FileEntry("name", c("content"), -1, false)); List<Difference> dd = Entry.getDifference... | testNoesNotIncludeNonModifiedChildDifferences |
269,099 | void () { Entry e1 = new DirectoryEntry("name"); Entry e2 = new DirectoryEntry("name"); e1.addChild(new FileEntry("name", c("content"), -1, false)); e2.addChild(new FileEntry("name", c("content"), -1, false)); assertTrue(Entry.getDifferencesBetween(e1, e2).isEmpty()); } | testDifferenceWithNotModifiedChildWithDifferentIdentity |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.