public void WithDirname_WithDirnameAndRelativeOrigin_ReplacesDirnameAndAddsDriveAndRoot() { const string dirname = "C:/new/dirname"; var path = new MockPath("file.txt"); var expected = new MockPath("C:/new/dirname/file.txt"); var actual = path.WithDirname(dirname); Assert.AreEqual(expected, actual); }
public void WithDirname_WithDirnameAndBothRelative_ReplacesDirname() { const string dirname = "new/dirname"; var path = new MockPath("file.txt"); var expected = new MockPath("new/dirname/file.txt"); var actual = path.WithDirname(dirname); Assert.AreEqual(expected, actual); }
public void WithDirname_WithDirnameAndDrive_ReplacesDirname() { const string dirname = "F:/new/dirname"; var path = new MockPath("C:/some/directory/file.txt"); var expected = new MockPath("C:/new/dirname/file.txt"); var actual = path.WithDirname(dirname); Assert.AreEqual(expected, actual); }