Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
dwaijam committed Jun 27, 2018
1 parent 9ba22cd commit 2960bdf
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lang/cs/Org.Apache.REEF.IO.Tests/TestLocalFileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,21 @@ public void TestCopy()
public void TestIsDirectory()
{
var fs = GetFileSystem();
// Directory check
var directoryUri = new Uri(Path.Combine(Path.GetTempPath(), TempFileName) + "/");
var fakeDirectoryUri = new Uri(Path.Combine(Path.GetTempPath(), "fakeDir") + "/");
fs.CreateDirectory(directoryUri);
Assert.True(fs.IsDirectory(directoryUri));

// File check
var fileUri = new Uri(directoryUri, "testfile");
MakeRemoteTestFile(fs, fileUri);
Assert.True(fs.IsDirectory(directoryUri));
Assert.False(fs.IsDirectory(fakeDirectoryUri));
Assert.False(fs.IsDirectory(fileUri));

// Fake directory check
var fakeDirectoryUri = new Uri(Path.Combine(Path.GetTempPath(), "fakeDir") + "/");
Assert.False(fs.IsDirectory(fakeDirectoryUri));

// Clean up
fs.Delete(fileUri);
fs.DeleteDirectory(directoryUri);
}
Expand Down

0 comments on commit 2960bdf

Please sign in to comment.