public void Error() { ISingleSource <int> src = MaybeSource.Error <int>(new InvalidOperationException()) .ToSingle(); src.Test().AssertFailure(typeof(InvalidOperationException)); }
public void Empty() { ISingleSource <int> src = MaybeSource.Empty <int>() .ToSingle(); src.Test().AssertFailure(typeof(IndexOutOfRangeException)); }
public void Success() { ISingleSource <int> src = MaybeSource.Just(1) .ToSingle(); src.Test().AssertResult(1); }