Esempio n. 1
0
        protected override void Check()
        {
            Bind(nameof(base.R1), nameof(P1));
            Bind(nameof(base.R2), nameof(P2));
            Bind <Action <int> >(nameof(base.R3), nameof(P3));
            Bind <Func <int> >(nameof(base.R3), nameof(P3));
            Bind(nameof(R1), nameof(Q1));
            Bind(nameof(R2), nameof(Q2));
            Bind <Action <int> >(nameof(R3), nameof(Q3));
            Bind <Func <int> >(nameof(R3), nameof(Q3));

            _x = 10;
            base.R1.ShouldBe(5);

            base.R2 = 12;
            _x.ShouldBe(24);

            base.R3.ShouldBe(48);
            base.R3 = 12;
            _x.ShouldBe(6);

            _x = 10;
            R1.ShouldBe(8);

            R2 = 12;
            _x.ShouldBe(14);

            R3.ShouldBe(16);
            R3 = 12;
            _x.ShouldBe(10);
        }
Esempio n. 2
0
        protected override void Check()
        {
            Bind(nameof(R1), nameof(P1));
            Bind(nameof(R2), nameof(P2));

            R1.ShouldBe(17);
            R2 = 33;
            _x.ShouldBe(33);
        }