public void Exceptional_OnException_SuccessIsFalse() { var example = new ThrowMyToys(); var x = example.ThrowAnException(); Assert.False(x.Success); Assert.True(x.Exception); }
public void Exceptional_OnException_Exception() { var example = new ThrowMyToys(); var x = example.ThrowAnException(); x.Match( Exception: ex => Assert.IsType <NullReferenceException>(ex), Success: s => Assert.True(false)//force fail if this is called ); }