Ejemplo n.º 1
0
        public void TextAnonymizingService_ThrowsArgumentNullException_OnNullArgument()
        {
            // Given
            ITextAnonymizingService service = new TextAnonymizingService();

            // When
            TestDelegate action = () => service.AnonymizeText(null);

            // Then
            Assert.That(action, Throws.ArgumentNullException);
        }
Ejemplo n.º 2
0
        public void TextAnonymizingService_HandlesMultipleWords()
        {
            // Given
            ITextAnonymizingService service = new TextAnonymizingService();
            string input = "I was waiting in traffic";

            // When
            string result = service.AnonymizeText(input);

            // Then
            AssertInputResult(input, result);
        }
Ejemplo n.º 3
0
        public void TextAnonymizingService_HandlesTwoWords()
        {
            // Given
            ITextAnonymizingService service = new TextAnonymizingService();
            string input = "Some waiting";

            // When
            string result = service.AnonymizeText(input);

            // Then
            AssertInputResult(input, result);
        }
Ejemplo n.º 4
0
        public void TextAnonymizingService_HandlesEmptyString()
        {
            // Given
            ITextAnonymizingService service = new TextAnonymizingService();
            string input = String.Empty;

            // When
            string result = service.AnonymizeText(input);

            // Then
            Assert.That(result, Is.EqualTo(""));
        }