public void ValueOrThrow_WithNone_ThrowsException() { var exception = new MyException(); Assert.That(() => None.ValueOrThrow(exception), Throws.TypeOf(exception.GetType())); }
public void ValueOrThrowUsing_WithNone_ThrowsException() { var exception = new MyException(); Action throwException = () => { throw exception; }; Assert.That(() => None.ValueOrThrowUsing(throwException), Throws.TypeOf(exception.GetType())); }