public void ShouldReturnTargetPathIfProvidersDontMatch() { // Given DirectoryPath sourcePath = new DirectoryPath("foo:///A/B"); FilePath targetPath = new FilePath("bar", "/A/B/C/test.txt"); // When FilePath resultPath = RelativePathResolver.Resolve(sourcePath, targetPath); // Then // Assert.AreEqual(targetPath, resultPath); // Uncomment and use this when NUnit is fixed Assert.IsTrue(targetPath.Equals(resultPath)); // Workaround for bug in NUnit with explicitly implemented interface method IEquality.Equals() }
public void SamePathsWithDifferentProvidersAreNotConsideredEqual() { // Given, When FilePath first = new FilePath(new Uri("foo:///"), "/shaders/basic.vert"); FilePath second = new FilePath(new Uri("bar:///"), "/shaders/basic.vert"); // Then Assert.False(first.Equals(second)); Assert.False(second.Equals(first)); }
public void SamePathsButDifferentCasingAreNotConsideredEqual() { // Given, When FilePath first = new FilePath("shaders/basic.vert"); FilePath second = new FilePath("SHADERS/BASIC.VERT"); // Then Assert.False(first.Equals(second)); Assert.False(second.Equals(first)); }
public void DifferentPathsAreNotConsideredEqual() { // Given, When FilePath first = new FilePath("shaders/basic.vert"); FilePath second = new FilePath("shaders/basic.frag"); // Then Assert.False(first.Equals(second)); Assert.False(second.Equals(first)); }
public void SamePathsAreConsideredEqual(bool isCaseSensitive) { // Given, When FilePath first = new FilePath("shaders/basic.vert"); FilePath second = new FilePath("shaders/basic.vert"); // Then Assert.True(first.Equals(second)); Assert.True(second.Equals(first)); }
public void SameAssetInstancesIsConsideredEqual(bool isCaseSensitive) { // Given, When FilePath path = new FilePath("shaders/basic.vert"); // Then Assert.True(path.Equals(path)); }