Example #1
0
        public void Test_Filter_Without_Profanity()
        {
            // Arrange
            var input    = "This is awesome.";
            var expected = input;

            // Act
            var resultTask = ProfanityFilterService.Filter(input);

            resultTask.Wait();

            var result = resultTask.Result;

            // Assert
            Assert.AreEqual(expected, result);
        }
Example #2
0
        public void Test_Filter_With_Empty_Input()
        {
            // Arrange
            var input    = " ";
            var expected = input;

            // Act
            var resultTask = ProfanityFilterService.Filter(input);

            resultTask.Wait();

            var result = resultTask.Result;

            // Assert
            Assert.AreEqual(expected, result);
        }
Example #3
0
        public void Test_Filter_With_Profanity()
        {
            // Arrange
            var input    = "What the f**k is this?";
            var expected = "What the **** is this?";

            // Act
            var resultTask = ProfanityFilterService.Filter(input);

            resultTask.Wait();

            var result = resultTask.Result;

            // Assert
            Assert.AreEqual(expected, result);
        }