public void WithExtension_WithMultipleExtensionPrependedWithDot_ReturnsPathWithNewLastExtension() { var expected = new MockPath(@"c:\users\nemec\file.tar.xml"); var path = new MockPath(@"c:\users\nemec\file.tar.txt"); var actual = path.WithExtension(".xml"); Assert.AreEqual(expected, actual); }
public void WithExtension_WithNoExtension_ReturnsPathWithNewExtension() { var expected = new MockPath(@"c:\users\nemec\file.xml"); var path = new MockPath(@"c:\users\nemec\file"); var actual = path.WithExtension("xml"); Assert.AreEqual(expected, actual); }
public void WithExtension_AddingTwoExtensions_ReturnsPathWithNewExtensions() { var expected = new MockPath(@"c:\users\nemec\file.tar.gz"); var path = new MockPath(@"c:\users\nemec\file.txt"); var actual = path.WithExtension("tar.gz"); Assert.AreEqual(expected, actual); }