コード例 #1
0
        public void GivenAnyWhenAlphaThenAlphaReturned()
        {
            var alpha = AnyVal.String();

            alpha.Should().NotBeNullOrEmpty();
            alpha.Should().MatchRegex("^[a-zA-Z]+$");
            Console.WriteLine(alpha);
        }
コード例 #2
0
        public void GivenAnyWhenAlphaMaxLenThenAlphaMaxLenReturned()
        {
            const int maxLength = 120;
            var       alpha     = AnyVal.String(maxLength);

            alpha.Length.Should().BeLessOrEqualTo(maxLength);
            alpha.Should().NotBeNullOrEmpty();
            alpha.Should().MatchRegex("^[a-zA-Z]{" + maxLength + "}$");
            Console.WriteLine(alpha);
        }