コード例 #1
0
        public void Equals_DifferentObjectWithSameValue_True()
        {
            var stringCassetteBody          = new StringCassetteBody("some text");
            var differentStringCassetteBody = new StringCassetteBody("some text");

            Assert.That(stringCassetteBody.Equals(differentStringCassetteBody), Is.True);
            Assert.That(stringCassetteBody.Equals((object)differentStringCassetteBody), Is.True);
            Assert.That(stringCassetteBody == differentStringCassetteBody, Is.True);
            Assert.That(stringCassetteBody != differentStringCassetteBody, Is.False);
        }
コード例 #2
0
        public void Equals_Null_False()
        {
            var stringCassetteBody          = new StringCassetteBody("some text");
            var differentStringCassetteBody = (StringCassetteBody)null;

            Assert.That(stringCassetteBody.Equals(differentStringCassetteBody), Is.False);
            Assert.That(stringCassetteBody.Equals((object)differentStringCassetteBody), Is.False);
            Assert.That(stringCassetteBody == differentStringCassetteBody, Is.False);
            Assert.That(stringCassetteBody != differentStringCassetteBody, Is.True);
        }
コード例 #3
0
        public void Equals_String_False()
        {
            var stringCassetteBody = new StringCassetteBody("some text");

            Assert.That(stringCassetteBody.Equals("String"), Is.False);
        }