예제 #1
0
        public void ReturnFalseWhenEnglish()
        {
            // Arrange
            var badwords = new[] { "p**n" };
            var service  = new ProfanityService(badwords);

            // Act
            var actual = service.HasNonEnglish("this text should be okay");

            // Assert
            Assert.IsFalse(actual);
        }
예제 #2
0
        public void ReturnTrueWhenCryllic()
        {
            // Arrange
            var badwords = new[] { "p**n" };
            var service  = new ProfanityService(badwords);

            // Act
            var actual = service.HasNonEnglish("Регистрация");

            // Assert
            Assert.IsTrue(actual);
        }