public void Equality_Case_Sensitive_Or_Not_Can_Be_Influenced() { var lhs = new SmartFolder(@"C:\Windows\"); var rhs = new SmartFolder(@"c:\windows"); lhs.Equals(rhs, StringComparison.CurrentCultureIgnoreCase).Should().BeTrue(); lhs.Equals(rhs, StringComparison.CurrentCulture).Should().BeFalse(); }
public void A_Folder_With_And_Without_Trailing_Separator_Are_The_Same() { var lhs = new SmartFolder(@"C:\Windows\"); var rhs = new SmartFolder(@"C:\Windows"); lhs.Equals(rhs).Should().BeTrue(); }
public void Equality_For_Relative_And_Absolute_Paths() { var lhs = new SmartFolder("."); var rhs = new SmartFolder(Environment.CurrentDirectory); lhs.Equals(rhs).Should().BeTrue(); }
public void Equality_For_String() { var sut = new SmartFolder(@"C:\temp\"); sut.Equals((object)@"C:\temp").Should().BeTrue(); sut.Should().Be(@"C:\temp"); sut.Should().Be(@"C:\temp\"); }