public void Equals_SamePath_ReturnsTrue() { var lhs = new FS().File(@"c:\temp\xyz"); var rhs = new FS().File(@"c:\temp\xyz\"); Assert.That(lhs.Equals(rhs), Is.True); }
public void Equals_DifferentPath_ReturnsFalse() { var lhs = new FS().File(@"c:\temp\xyz"); var rhs = new FS().File(@"c:\temp\ABC"); Assert.That(lhs.Equals(rhs), Is.False); }
public void WriteAll_MultipleLines_AllLinesWritten() { var file = new FS().File(@"/some/folder/file"); file.WriteAll("line1", "line2", "line3"); Assert.That(file.ReadAllLines(), Is.EquivalentTo(new[] { "line1", "line2", "line3" })); }
public void Parent_SomePath_ParentReturned() { var entry = new FS().Directory(@"c:\temp\xyz"); Assert.That(entry.Parent.Path, Is.EqualTo(@"c:\temp")); }
public void Parent_WithFileSystemRoot_ReturnsNull() { var entry = new FS().Directory(@"c:"); Assert.That(entry.Parent, Is.Null); }