예제 #1
0
        public void WhenLeftNotNullRightNull_ShouldBeFalse()
        {
            // Arrange
            var a = TestableBooleanValue.Create(true);

            // act
            var actual = a == null;

            // assert
            actual.Should().BeFalse();
        }
예제 #2
0
        public void WhenFalse_ShouldCastToTrue()
        {
            // Arrange
            var value = TestableBooleanValue.Create(true);

            // Act
            var actual = (bool)value;

            // Assert
            actual.Should().BeTrue();
        }
예제 #3
0
        public void WhenFalse_ShouldBeFalse()
        {
            // Arrange
            var input = TestableBooleanValue.Create(false);

            // act
            bool actual = input;

            // assert
            actual.Should().BeFalse();
        }
예제 #4
0
        public void WhenObjectOfDifferentType_ShouldBeFalse()
        {
            // Arrange
            var a = TestableBooleanValue.Create(true);
            var b = new object();

            // Act
            var actual = a == b;

            // Assert
            actual.Should().BeFalse();
        }
예제 #5
0
        public void WhenObjectOfDifferentBooleanValueType_ShouldBeTrue()
        {
            // Arrange
            var a = TestableBooleanValue.Create(true);
            var b = AnotherTestableBooleanValue.Create(true);

            // Act
            var actual = a != b;

            // Assert
            actual.Should().BeTrue();
        }
예제 #6
0
        public void WhenComparingFalseToBooleanValueTrue_ShouldNotBeEqual()
        {
            // arrange
            const bool a = false;
            var        b = TestableBooleanValue.Create(true);

            // act
            var actual = a == b;

            // assert
            actual.Should().BeFalse();
        }
예제 #7
0
        public void WhenComparingBooleanValueTrueToTrue_ShouldBeEqual()
        {
            // arrange
            var        a = TestableBooleanValue.Create(true);
            const bool b = true;

            // act
            var actual = a == b;

            // assert
            actual.Should().BeTrue();
        }