Exemple #1
0
        public void ThrowException_WhenStringForNullEmptyMethod_IsProvidedNullValue()
        {
            //Arrange
            var fakeWriter    = new Mock <IWriter>();
            var mockValidator = new ValidateCore(fakeWriter.Object);

            //Act & Assert
            Assert.ThrowsException <ArgumentException>(() => mockValidator.StringForNullEmpty(null));
        }
Exemple #2
0
        public void ThrowException_WhenStringForNullEmptyMethod_IsProvidedStringOfEmptyValue()
        {
            //Arrange
            var fakeWriter         = new Mock <IWriter>();
            var mockValidator      = new ValidateCore(fakeWriter.Object);
            var listWithEmptyValue = new string[] { "", "test" };

            //Act & Assert
            Assert.ThrowsException <ArgumentException>(() => mockValidator.StringForNullEmpty(listWithEmptyValue));
        }