Ejemplo n.º 1
0
        public void EqualsShould_Be_True_For_Equal_Tags()
        {
            OpcTag ot1        = new OpcTag("ot1", "value1");
            OpcTag ot1Compare = new OpcTag("ot1", "value1");

            Assert.IsTrue(ot1.Equals(ot1Compare));
        }
Ejemplo n.º 2
0
        public void EqualsShould_Be_True_For_Equal_Tags()
        {
            OpcTag ot1 = new OpcTag("ot1", "value1");
            OpcTag ot1Compare = new OpcTag("ot1", "value1");

            Assert.IsTrue(ot1.Equals(ot1Compare));
        }
Ejemplo n.º 3
0
        public void EqualsShould_Be_False_For_Tags_Differing_In_One_Or_More_Fields()
        {
            OpcTag ot1 = new OpcTag("ot1", "value1", OpcTag.OpcTagQuality.Good);

            OpcTag notEqualtToOt1 = new OpcTag("ot2", "value1", OpcTag.OpcTagQuality.Good);
            Assert.IsFalse(ot1.Equals(notEqualtToOt1));

            notEqualtToOt1 = new OpcTag("ot1", "value2", OpcTag.OpcTagQuality.Good);
            Assert.IsFalse(ot1.Equals(notEqualtToOt1));

            notEqualtToOt1 = new OpcTag("ot1", "value1", OpcTag.OpcTagQuality.Bad);
            Assert.IsFalse(ot1.Equals(notEqualtToOt1));

            notEqualtToOt1 = new OpcTag("ot1", "value2", OpcTag.OpcTagQuality.Bad);
            Assert.IsFalse(ot1.Equals(notEqualtToOt1));

            notEqualtToOt1 = new OpcTag("ot2", "value2", OpcTag.OpcTagQuality.Bad);
            Assert.IsFalse(ot1.Equals(notEqualtToOt1));
        }
Ejemplo n.º 4
0
        public void EqualsShould_Be_False_For_Tags_Differing_In_One_Or_More_Fields()
        {
            OpcTag ot1 = new OpcTag("ot1", "value1", OpcTag.OpcTagQuality.Good);

            OpcTag notEqualtToOt1 = new OpcTag("ot2", "value1", OpcTag.OpcTagQuality.Good);

            Assert.IsFalse(ot1.Equals(notEqualtToOt1));

            notEqualtToOt1 = new OpcTag("ot1", "value2", OpcTag.OpcTagQuality.Good);
            Assert.IsFalse(ot1.Equals(notEqualtToOt1));

            notEqualtToOt1 = new OpcTag("ot1", "value1", OpcTag.OpcTagQuality.Bad);
            Assert.IsFalse(ot1.Equals(notEqualtToOt1));

            notEqualtToOt1 = new OpcTag("ot1", "value2", OpcTag.OpcTagQuality.Bad);
            Assert.IsFalse(ot1.Equals(notEqualtToOt1));

            notEqualtToOt1 = new OpcTag("ot2", "value2", OpcTag.OpcTagQuality.Bad);
            Assert.IsFalse(ot1.Equals(notEqualtToOt1));
        }