Ejemplo n.º 1
0
        public void WhenLeft_DoLeft_DontDoRight()
        {
            var either = new Either <Exception, bool>(new Exception());

            either.DoLeft(r => Assert.IsType <Exception>(r));
            either.DoRight(l => Assert.True(false, "Right was executed."));
        }
Ejemplo n.º 2
0
        public void WhenRight_DoRight_DontDoLeft()
        {
            var either = new Either <Exception, bool>(true);

            either.DoRight(r => Assert.True(r));
            either.DoLeft(l => Assert.True(false, "Left was executed."));
        }