Example #1
0
            public void Should_Forward_Property_Assignment_To_Target()
            {
                // Given
                var fixture = new DynamicTargetProxyFixture();
                dynamic proxy = fixture.CreateProxy();

                // When
                proxy.Test = 1;

                // Then
                fixture.Target.Received(1).SetProperty("Test", 1);
            }
Example #2
0
            public void Should_Forward_Property_Retrieval_To_Target()
            {
                // Given
                var fixture = new DynamicTargetProxyFixture();
                dynamic proxy = fixture.CreateProxy();

                // When
                var result = proxy.Test;

                // Then
                fixture.Target.Received(1).GetProperty("Test");
            }
Example #3
0
            public void Should_Forward_Method_Calls_To_Target()
            {
                // Given
                var fixture = new DynamicTargetProxyFixture();
                dynamic proxy = fixture.CreateProxy();

                // When
                proxy.Test();

                // Then
                fixture.Target.Received(1).Invoke("Test");
            }