Exemple #1
0
        public void ReturnRespectsInnerUnauthorizedMonad()
        {
            var asserterVisitor = new AssertProcessVisitor <Int32>
            {
                ExpectedMonadType = ExpectedMonad.Unauthorized,
            };

            ProcessMonad <Int32>
            .With(() => new UnauthorizedMonad <Int32>())
            .Accept(asserterVisitor);
        }
Exemple #2
0
        public void ReturnRespectsInnerErrorMonad()
        {
            var asserterVisitor = new AssertProcessVisitor <Int32>
            {
                ExpectedMonadType = ExpectedMonad.Error,
                ExpectedValue     = "some err"
            };

            ProcessMonad <Int32>
            .With(() => new ErrorMonad <Int32>("some err"))
            .Accept(asserterVisitor);
        }
Exemple #3
0
        public void ReturnRespectsInnerValueMonad()
        {
            var asserterVisitor = new AssertProcessVisitor <Int32>
            {
                ExpectedMonadType = ExpectedMonad.Value,
                ExpectedValue     = 2020
            };

            ProcessMonad <Int32>
            .With(() => new ValueMonad <Int32>(2020))
            .Accept(asserterVisitor);
        }