public void ThrowException_WhenCheckNullObjectMethod_IsProvidedNullValue() { //Arrange var fakeWriter = new Mock <IWriter>(); var mockValidator = new ValidateCore(fakeWriter.Object); //Act & Assert Assert.ThrowsException <ArgumentException>(() => mockValidator.CheckNullObject(null)); }
public void ThrowException_WhenCheckNullObjectMethod_IsProvidedStringOfNullValues() { //Arrange var fakeWriter = new Mock <IWriter>(); var mockValidator = new ValidateCore(fakeWriter.Object); var listWithNullValue = new object[] { "test", null }; //Act & Assert Assert.ThrowsException <ArgumentException>(() => mockValidator.CheckNullObject(listWithNullValue)); }