Пример #1
0
        public void GivenAnyWhenAlphanumericThenAlphanumericReturned()
        {
            var alphaNumericReturned = AnyVal.Alphanumeric();

            alphaNumericReturned.Should().MatchRegex("^[a-zA-Z0-9]*");
            Console.WriteLine(alphaNumericReturned);
        }
Пример #2
0
        public void GivenAnyWhenAlphanumericWithSizeThenAlphanumericReturned()
        {
            var size = AnyVal.PositiveInt32(32);
            var alphaNumericReturned = AnyVal.Alphanumeric(size);

            alphaNumericReturned.Should().MatchRegex("^[a-zA-Z0-9]*");
            alphaNumericReturned.Length.Should().Be(size);
            Console.WriteLine(alphaNumericReturned);
        }