Esempio n. 1
0
        public void Client_ComplexParameters_EnsureSameOnServer()
        {
            ITestContract        client = CreateChannel();
            Mock <ITestContract> server = Server();
            CompositeType        arg1   = CompositeType.CreateRandom();

            server.Setup(v => v.SimpleMethodWithComplexParameter(arg1)).Callback <CompositeType>(serverArg =>
            {
                Assert.NotSame(serverArg, arg1);
                Assert.Equal(serverArg, arg1);
            });

            client.SimpleMethodWithComplexParameter(arg1);
        }