Esempio n. 1
0
        public void CommentEquals()
        {
            XComment c1 = new XComment("xxx");
            XComment c2 = new XComment("xxx");
            XComment c3 = new XComment("yyy");

            Assert.False(c1.Equals(null));
            Assert.False(c1.Equals("foo"));
            Assert.True(c1.Equals(c1));
            Assert.False(c1.Equals(c2));
            Assert.False(c1.Equals(c3));
        }
Esempio n. 2
0
                /// <summary>
                /// Validates the behavior of the Equals overload on XComment.
                /// </summary>
                /// <returns>true if pass, false if fail</returns>
                //[Variation(Desc = "CommentEquals")]
                public void CommentEquals()
                {
                    XComment c1 = new XComment("xxx");
                    XComment c2 = new XComment("xxx");
                    XComment c3 = new XComment("yyy");

                    bool b1 = c1.Equals(null);
                    bool b2 = c1.Equals("foo");
                    bool b3 = c1.Equals(c1);
                    bool b4 = c1.Equals(c2);
                    bool b5 = c1.Equals(c3);

                    Validate.IsEqual(b1, false);
                    Validate.IsEqual(b2, false);
                    Validate.IsEqual(b3, true);
                    Validate.IsEqual(b4, false);
                    Validate.IsEqual(b5, false);
                }