コード例 #1
0
        public void GivenOneValidatingSemanticType_WhenTheValueIsValid_ThenTheConstructor_ShouldNotThrowAnyException()
        {
            // ReSharper disable once AssignmentIsFullyDiscarded
            Action construction = () => _ = new StringValidatingSemanticType("is valid");

            construction.Should().NotThrow();
        }
コード例 #2
0
        public void GivenOneValidatingSemanticType_WhenTheValueIsInvalid_ThenTheConstructor_ShouldThrowOneArgumentException()
        {
            // ReSharper disable once AssignmentIsFullyDiscarded
            Action construction = () => _ = new StringValidatingSemanticType("invalid");

            construction.Should().Throw <ArgumentException>();
        }