public void IsAscii_returns_true_for_mixed_case_ascii_string()
        {
            // arrange
            var input = "TaYeRtGeYReerfGHdTReFF";
            var regex = new Blobby.Utils.Regex();

            // act
            var isAscii = regex.IsAscii(input);

            // assert
            Assert.True(isAscii);
        }
        public void IsAscii_returns_true_for_uppercase_ascii_string()
        {
            // arrange
            var input = "TYRGYRGHTRFF";
            var regex = new Blobby.Utils.Regex();

            // act
            var isAscii = regex.IsAscii(input);

            // assert
            Assert.True(isAscii);
        }
        public void GetMatches_returns_empty_list_for_null_input()
        {
            // arrange
            string input = null;
            var regex = new Regex();

            // act
            var matches = regex.GetMatches(input, "some pattern");

            // assert
            Assert.That(matches.Count, Is.EqualTo(0));
        }
        public void IsAscii_returns_false_for_string_with_numbers_and_letters()
        {
            // arrange
            var input = "123456 and some letters";
            var regex = new Blobby.Utils.Regex();

            // act
            var isAscii = regex.IsAscii(input);

            // assert
            Assert.False(isAscii);
        }
        public void IsAscii_returns_false_for_null_string()
        {
            // arrange
            string input = null;
            var    regex = new Blobby.Utils.Regex();

            // act
            var isAscii = regex.IsAscii(input);

            // assert
            Assert.False(isAscii);
        }
        public void IsAscii_returns_false_for_whitespace_string()
        {
            // arrange
            var input = "       ";
            var regex = new Blobby.Utils.Regex();

            // act
            var isAscii = regex.IsAscii(input);

            // assert
            Assert.False(isAscii);
        }
        public void IsMatch_returns_false_when_nonnumeric_input_is_checked_for_numbers()
        {
            // arrange
            var input   = "some alpha string without numbers";
            var pattern = @"\d";
            var regex   = new Blobby.Utils.Regex();

            // act
            var isMatch = regex.IsMatch(input, pattern);

            // assert
            Assert.False(isMatch);
        }
        public void GetMatches_returns_empty_list_for_no_match()
        {
            // arrange
            var input = "abcdefg";
            var pattern = "zzz";
            var regex = new Regex();

            // act
            var matches = regex.GetMatches(input, pattern);

            // assert
            Assert.That(matches.Count, Is.EqualTo(0));
        }
        public void IsMatch_returns_true_for_numeric_input()
        {
            // arrange
            var input   = "123456";
            var pattern = @"\d";
            var regex   = new Blobby.Utils.Regex();

            // act
            var isMatch = regex.IsMatch(input, pattern);

            // assert
            Assert.True(isMatch);
        }
        public void GenerateRandomAlpha_returns_string_with_only_ascii_characters()
        {
            // arrange
            var utils = new StringUtils();

            // act
            var actual = utils.GenerateRandomAlpha(8);

            // assert
            var regex = new Blobby.Utils.Regex();
            var isAscii = regex.IsAscii(actual);
            Assert.True(isAscii);
        }
        public void GetMatches_returns_correct_list_for_two_matches()
        {
            // arrange
            var input = "abcdefg zzz asdfds zzz werewr";
            var pattern = "zzz";
            var regex = new Regex();

            // act
            var matches = regex.GetMatches(input, pattern);

            // assert
            Assert.That(matches.Count, Is.EqualTo(2));
            Assert.That(matches.First(), Is.EqualTo("zzz"));
        }
        public void GenerateRandomAlpha_returns_string_with_only_ascii_characters()
        {
            // arrange
            var utils = new StringUtils();

            // act
            var actual = utils.GenerateRandomAlpha(8);

            // assert
            var regex   = new Blobby.Utils.Regex();
            var isAscii = regex.IsAscii(actual);

            Assert.True(isAscii);
        }
        public void IsAscii_returns_false_for_string_with_only_numbers()
        {
            // arrange
            var input = "123456";
            var regex = new Blobby.Utils.Regex();

            // act
            var isAscii = regex.IsAscii(input);

            // assert
            Assert.False(isAscii);
        }
        public void IsAscii_returns_true_for_uppercase_ascii_string()
        {
            // arrange
            var input = "TYRGYRGHTRFF";
            var regex = new Blobby.Utils.Regex();

            // act
            var isAscii = regex.IsAscii(input);

            // assert
            Assert.True(isAscii);
        }
        public void IsMatch_returns_false_when_nonnumeric_input_is_checked_for_numbers()
        {
            // arrange
            var input = "some alpha string without numbers";
            var pattern = @"\d";
            var regex = new Blobby.Utils.Regex();

            // act
            var isMatch = regex.IsMatch(input, pattern);

            // assert
            Assert.False(isMatch);
        }
        public void IsMatch_returns_true_for_numeric_input()
        {
            // arrange
            var input = "123456";
            var pattern = @"\d";
            var regex = new Blobby.Utils.Regex();

            // act
            var isMatch = regex.IsMatch(input, pattern);

            // assert
            Assert.True(isMatch);
        }
        public void IsAscii_returns_false_for_empty_string()
        {
            // arrange
            var input = "";
            var regex = new Blobby.Utils.Regex();

            // act
            var isAscii = regex.IsAscii(input);

            // assert
            Assert.False(isAscii);
        }
        public void IsAscii_returns_true_for_mixed_case_ascii_string()
        {
            // arrange
            var input = "TaYeRtGeYReerfGHdTReFF";
            var regex = new Blobby.Utils.Regex();

            // act
            var isAscii = regex.IsAscii(input);

            // assert
            Assert.True(isAscii);
        }