public void EqualsWorkOnDifferentNonBlankInstances() { ImplementationKeyComparer comparer = new ImplementationKeyComparer(); Assert.IsFalse(comparer.Equals(new ImplementationKey("file", "app", true), new ImplementationKey("file", null, false))); Assert.IsFalse(comparer.Equals(new ImplementationKey("file", "app", true), new ImplementationKey("file2", "app", true))); Assert.IsFalse(comparer.Equals(new ImplementationKey("file", "app", true), new ImplementationKey("file", "app2", true))); Assert.IsFalse(comparer.Equals(new ImplementationKey("file", "app", true), new ImplementationKey("file", "app", false))); Assert.IsTrue(comparer.Equals(new ImplementationKey(null, "app", true), new ImplementationKey(null, "app", true))); Assert.IsTrue(comparer.Equals(new ImplementationKey("file", "app", true), new ImplementationKey("file", "app", true))); Assert.IsTrue(comparer.Equals(new ImplementationKey("file", "app", true), new ImplementationKey("FIle", "app", true))); Assert.IsTrue(comparer.Equals(new ImplementationKey("file", "app", true), new ImplementationKey("FIle", "APP", true))); StringBuilder sb = new StringBuilder(); sb.Append("string"); String string1 = sb.ToString(); String string2 = sb.ToString(); Assert.IsTrue(comparer.Equals(new ImplementationKey(string1, "app", true), new ImplementationKey(string2, "app", true))); Assert.IsTrue(comparer.Equals(new ImplementationKey("file", string1, true), new ImplementationKey("file", string2, true))); }
public void EqualsWorkOnBlankRhsInstance() { ImplementationKeyComparer comparer = new ImplementationKeyComparer(); Assert.IsFalse(comparer.Equals(new ImplementationKey("file", "app", true), new ImplementationKey())); }
public void EqualsWorkOnBlankInstances() { ImplementationKeyComparer comparer = new ImplementationKeyComparer(); Assert.IsTrue(comparer.Equals(new ImplementationKey(), new ImplementationKey())); }