public void PointOutsideCanvas(int x, int y) { Canvas.CreateCanvas(1, 1).ConsumeRight(canvas => { Assert.AreEqual( MaybeFactory.Some(Error.New("point outside canvas")), canvas.DrawPoint(Tuple.Create(x, y))); }); }
public void ConsumeSome() { MaybeFactory.Some(1) .ConsumeNone(Assert.Fail) .ConsumeSome(v => Assert.AreEqual(1, v)); }