Exemple #1
0
        public void ThrowExceptionIfNull_WithNullArguments_ShouldThrow_ArgumentNullException()
        {
            //Act
            Action act = () => NullChecking.ThrowExceptionIfNull(null, "Something");

            //Assert
            act.Should().ThrowExactly <ArgumentNullException>().Where(e => e.Message.Contains("Something"));
        }
Exemple #2
0
        public void ThrowExceptionIfNull_WithGoodArguments_ShouldNotThrow_ArgumentNullException()
        {
            //Act
            Action act = () => NullChecking.ThrowExceptionIfNull(new object(), "Something");

            //Assert
            act.Should().NotThrow();
        }