public void OrElse_Theory(IMaybe <int> m1, IMaybe <int> m2, IMaybe <int> expectation) { // arrange - theory // act var result = m1.OrElse(() => m2); // assert Assert.Equal(expectation, result); }
public ImmutableArray <T> Build() { if (_built) { throw new InvalidOperationException( "ImmutableArray<T>.Builder already built"); } _built = true; return(new ImmutableArray <T>(_buffer.OrElse(_source))); }