コード例 #1
0
        public void PrimitiveWrapper_CompareToSameObject_ShouldBeEqual()
        {
            // Arrange
            var    first  = new WrapperTest(1);
            object second = first;

            // Act
            var areEqual = first.Equals(second);

            // Assert
            areEqual.Should().BeTrue();
        }
コード例 #2
0
        public void PrimitiveWrapper_CompareToOtherTypeObject_ShouldBeNotEqual()
        {
            // Arrange
            var    first  = new WrapperTest(1);
            object second = "toto";

            // Act
            var areEqual = first.Equals(second);

            // Assert
            areEqual.Should().BeFalse();
        }
コード例 #3
0
        public void PrimitiveWrapper_CompareToNotNullPrimitiveWrapper_ShouldNotBeEqual()
        {
            // Arrange
            WrapperTest first  = new WrapperTest(1);
            WrapperTest second = null;

            // Act
            var areEqual = first.Equals(second);

            // Assert
            areEqual.Should().BeFalse();
        }