Beispiel #1
0
        public void TestCapabilityOperators()
        {
            var c1 = new Capability <string>
            {
                Current    = "a",
                Candidates = new List <string>()
                {
                    "a", "b", "c"
                }
            };
            var c2 = new Capability <string>()
            {
                Current    = "a",
                Candidates = new List <string>()
                {
                    "a", "b", "c", "d"
                }
            };

            Assert.IsTrue(c1 != null);
            Assert.IsFalse(c1 == null);
            Assert.IsTrue(null != c1);
            Assert.IsFalse(null == c1);
            Assert.IsTrue(c1 == c1);
            Assert.IsFalse(c1 != c1);
            Assert.IsFalse(c1 == c2);
            Assert.IsTrue(c1 != c2);

            Assert.IsFalse(c1.Equals(null));
        }