public void GetParents_WithAParent_DoesNotReturnSelf() { var path = new MockPath(@"C:\nemec"); var parents = path.Parents(); Assert.AreEqual(1, parents.Count()); }
public void GetParents_WithAParent_DoesNotReturnSelf() { var path = new MockPath(@"C:\nemec"); var parents = path.Parents(); Assert.Single(parents); }
public void GetParents_WithMultipleParents_ReturnsTheParentsFromMostToLeastSpecific() { var path = new MockPath(@"C:\users\nemec"); var expected = new[] { new MockPath(@"C:\users"), new MockPath(@"C:\") }; Assert.True(expected.SequenceEqual(path.Parents())); }
public void GetParents_WithAParent_ReturnsTheParent() { var path = new MockPath(@"C:\nemec"); var expected = new MockPath(@"C:\"); var parents = path.Parents().GetEnumerator(); parents.MoveNext(); var actual = parents.Current; Assert.AreEqual(expected, actual); }