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 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)));
        }
Esempio n. 3
0
        public void EqualsWorkOnBlankRhsInstance()
        {
            ImplementationKeyComparer comparer = new ImplementationKeyComparer();

            Assert.IsFalse(comparer.Equals(new ImplementationKey("file", "app", true), new ImplementationKey()));
        }
Esempio n. 4
0
        public void EqualsWorkOnBlankInstances()
        {
            ImplementationKeyComparer comparer = new ImplementationKeyComparer();

            Assert.IsTrue(comparer.Equals(new ImplementationKey(), new ImplementationKey()));
        }
 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()));
 }