public void New_Message_BaseMessageIsSet() { var ex = Assert.Throws <SettingsLoaderException>( () => ExceptionTestClass.ThrowWithMessage()); Assert.Equal("TestMessage", ex.Message); }
public void SettingValueThrowsException() { ReflectorMember member = ReflectorMember.Create(typeof(ExceptionTestClass).GetProperty("ExceptionProperty")); ExceptionTestClass testClass = new ExceptionTestClass(); member.SetValue(testClass, null); }
public void New_MessageAndInnerException_BaseParametersAreSet() { var ex = Assert.Throws <SettingsLoaderException>( () => ExceptionTestClass.ThrowWithMessageAndInnerException()); Assert.Equal("TestMessage", ex.Message); Assert.Equal("InnerMessage", ex.InnerException?.Message); }