Beispiel #1
0
        protected override void Check()
        {
            _i = 2;
            Bind(nameof(N), nameof(M));

            N(2).ShouldBe(4);
            N(10).ShouldBe(20);

            var x = new X1 {
                _i = 3
            };

            Bind(nameof(x.N), nameof(x.M));

            x.N(2).ShouldBe(6);
            x.N(10).ShouldBe(30);

            Bind(nameof(A.N), nameof(A.M));

            A.N(2).ShouldBe(8);
            A.N(10).ShouldBe(40);

            Bind(nameof(_b.N), nameof(_b.M));

            _b.N(2).ShouldBe(10);
            _b.N(10).ShouldBe(50);

            Bind(nameof(this._b.N), nameof(this.A.M));

            this._b.N(2).ShouldBe(8);
            this._b.N(10).ShouldBe(40);
        }
Beispiel #2
0
		protected override void Check()
		{
			_i = 2;
			Bind(nameof(N), nameof(M));

			N(2).ShouldBe(4);
			N(10).ShouldBe(20);

			var x = new X1 { _i = 3 };
			Bind(nameof(x.N), nameof(x.M));

			x.N(2).ShouldBe(6);
			x.N(10).ShouldBe(30);

			Bind(nameof(A.N), nameof(A.M));

			A.N(2).ShouldBe(8);
			A.N(10).ShouldBe(40);

			Bind(nameof(_b.N), nameof(_b.M));

			_b.N(2).ShouldBe(10);
			_b.N(10).ShouldBe(50);

			Bind(nameof(this._b.N), nameof(this.A.M));

			this._b.N(2).ShouldBe(8);
			this._b.N(10).ShouldBe(40);
		}