Esempio n. 1
0
        public void GivenAnyWhenAlphaThenAlphaReturned()
        {
            var alpha = AnyVal.String();

            alpha.Should().NotBeNullOrEmpty();
            alpha.Should().MatchRegex("^[a-zA-Z]+$");
            Console.WriteLine(alpha);
        }
Esempio n. 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);
        }