Esempio n. 1
0
        public void When_Null_Then_Valid()
        {
            // ARRANGE
            var attribute = new MustBeTrueAttribute();

            // ACT
            var result = attribute.IsValid(null);

            // ASSERT
            result.Should().BeTrue();
        }
Esempio n. 2
0
        public void When_String_Then_Invalid()
        {
            // ARRANGE
            var attribute = new MustBeTrueAttribute();

            // ACT
            var isValid = attribute.IsValid("Hello");

            // ASSERT
            isValid.Should().BeFalse();
        }
Esempio n. 3
0
        public void When_True_Then_Valid()
        {
            // ARRANGE
            var attribute = new MustBeTrueAttribute();

            // ACT
            var isValid = attribute.IsValid(true);

            // ASSERT
            isValid.Should().BeTrue();
        }