public void ExceptionThrownStatic() { Tuple <int> myObject = null; Assert.Throws <NullReferenceException>(() => { SafeFormatExtensions.SafeFormat("a{0}c", myObject.Item1); }); }
public void StaticMethod() { var res = SafeFormatExtensions.SafeFormat("a{0}c", "b"); res.Should().Be("abc"); }
public void ForceOuterExcpetionStatic() { var res = SafeFormatExtensions.SafeFormat("a{0}c", new MyClass()); res.Should().Be("Exception created for unit testing use."); }