Пример #1
0
        public static void HandleWithExpression()
        {
            var rock = Rock.Create <IExpectationsTests>();

            rock.Handle(_ => _.Target(44 + ExpectationsTests.Create()));

            var chunk = rock.Make();

            chunk.Target(88);
        }
Пример #2
0
        public static void HandleWithCallAndInvalidValue()
        {
            var rock = Rock.Create <IExpectationsTests>();

            rock.Handle(_ => _.Target(ExpectationsTests.Create()));

            var chunk = rock.Make();

            Assert.That(() => chunk.Target(1), Throws.TypeOf <ExpectationException>());
        }