示例#1
0
        public void GivenVerifyOnIntNullable_WhenNull_ShouldReturnVerifyContext()
        {
            int?intRoot = null;

            VerifyContext <int?> context = intRoot.Verify(nameof(intRoot));

            context.Should().NotBeNull();
            context.Name.Should().Be(nameof(intRoot));
            context.Value.Should().Be(intRoot);
        }
示例#2
0
        public void GivenVerifyOnNullString_WhenBinded_ShouldReturnVerifyContext()
        {
            string?root = null;

            VerifyContext <string?> context = root.Verify(nameof(root));

            context.Should().NotBeNull();
            context.Name.Should().Be(nameof(root));
            context.Value.Should().BeNull();
        }
示例#3
0
        public void GivenVerifyOnInt_WhenBinded_ShouldReturnVerifyContext()
        {
            int intRoot = 10;

            VerifyContext <int> context = intRoot.Verify(nameof(intRoot));

            context.Should().NotBeNull();
            context.Name.Should().Be(nameof(intRoot));
            context.Value.Should().Be(intRoot);
        }
示例#4
0
        public void GivenVerifyOnString_WhenBinded_ShouldReturnVerifyContext()
        {
            string root = "This is a test";

            VerifyContext <string> context = root.Verify(nameof(root));

            context.Should().NotBeNull();
            context.Name.Should().Be(nameof(root));
            context.Value.Should().Be(root);
        }