Exemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldGiveAClearErrorMessageIfTheDestinationsParentDirectoryDoesntExist() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        internal virtual void ShouldGiveAClearErrorMessageIfTheDestinationsParentDirectoryDoesntExist()
        {
            Path archive     = _testDirectory.file("the-archive.dump").toPath();
            Path destination = Paths.get(_testDirectory.absolutePath().AbsolutePath, "subdir", "the-destination");
            NoSuchFileException noSuchFileException = assertThrows(typeof(NoSuchFileException), () => (new Loader()).load(archive, destination, destination));

            assertEquals(destination.Parent.ToString(), noSuchFileException.Message);
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldGiveAClearErrorMessageIfTheArchiveDoesntExist()
        internal virtual void ShouldGiveAClearErrorMessageIfTheArchiveDoesntExist()
        {
            Path archive     = _testDirectory.file("the-archive.dump").toPath();
            Path destination = _testDirectory.file("the-destination").toPath();
            NoSuchFileException exception = assertThrows(typeof(NoSuchFileException), () => (new Loader()).load(archive, destination, destination));

            assertEquals(archive.ToString(), exception.Message);
        }
Exemplo n.º 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldGiveAClearErrorMessageIfTheArchivesParentDirectoryDoesntExist()
        internal virtual void ShouldGiveAClearErrorMessageIfTheArchivesParentDirectoryDoesntExist()
        {
            Path directory = _testDirectory.directory("a-directory").toPath();
            Path archive   = _testDirectory.file("subdir/the-archive.dump").toPath();
            NoSuchFileException exception = assertThrows(typeof(NoSuchFileException), () => (new Dumper()).dump(directory, directory, archive, GZIP, Predicates.alwaysFalse()));

            assertEquals(archive.Parent.ToString(), exception.Message);
        }
Exemplo n.º 4
0
 internal TreeFileNotFoundException(string message, NoSuchFileException cause) : base(message, cause)
 {
 }