Exemplo n.º 1
0
        public void Get_Test()
        {
            var prop1 = new MockProp1();
            var a     = new CssPropertiesSet()
            {
                prop1, new MockProp2()
            };

            Assert.AreSame(prop1, a.Get <MockProp1>());
            Assert.IsNull(a.Get <MockProp3>());
        }
Exemplo n.º 2
0
        public void Equals_TrueTest()
        {
            var prop  = new MockProp1();
            var other = new CssPropertiesSet
            {
                prop
            };

            _instance.Add(prop);

            Assert.IsTrue(_instance.Equals(other));
        }
Exemplo n.º 3
0
        public void GetHashCode_Colision()
        {
            var a     = new CssPropertiesSet();
            var b     = new CssPropertiesSet();
            var prop1 = new MockProp1();
            var prop2 = new MockProp2();

            a.Add(prop1);
            a.Add(prop2);
            b.Add(prop1);
            b.Add(prop2);

            Assert.AreEqual(a.GetHashCode(), b.GetHashCode());
        }