Exemple #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void nextAlphaNumericString()
        public virtual void NextAlphaNumericString()
        {
            ISet <int> seenDigits = "ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789".chars().boxed().collect(Collectors.toSet());

            for (int i = 0; i < ITERATIONS; i++)
            {
                TextValue textValue = RandomValues.nextAlphaNumericTextValue(10, 20);
                string    asString  = textValue.StringValue();
                for (int j = 0; j < asString.Length; j++)
                {
                    int ch = asString[j];
                    assertTrue("Not a character nor letter: " + ch, Character.isAlphabetic(ch) || char.IsDigit(ch));
                    seenDigits.remove(ch);
                }
            }
            assertThat(seenDigits, empty());
        }