Aspects.Logging.Tests.Extensions.FormattableObjectExtensionTests.WhenProvidingANullInstanceShouldThrowException C# (CSharp) Method

WhenProvidingANullInstanceShouldThrowException() private method

private WhenProvidingANullInstanceShouldThrowException ( ) : void
return void
        public void WhenProvidingANullInstanceShouldThrowException()
        {
            try
            {
                const string Teststring = "{TestString}";
                ((FormatableObject)null).ToString(Teststring);

                Assert.Fail("Should not hit this because we're supposed to throw an exception");
            }
            catch (Exception e)
            {
                e.Should().BeOfType<ArgumentNullException>();
            }
        }
    }