示例#1
0
        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));
        }
示例#2
0
        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));
        }