コード例 #1
0
        public void StaticMethodStillRegistered()
        {
            SimplePocoClassSerializer.CallCounter = 0;
            var input = new SimplePocoClass {
                A = 30
            };
            var output = (SimplePocoClass)fixture.SerializationManager.DeepCopy(input);

            Assert.Equal(1, SimplePocoClassSerializer.CallCounter);
            Assert.Equal(input.A, output.A);
        }
コード例 #2
0
        public void ConstructorIsCalled()
        {
            SimplePocoClassSerializer.CallCounter = 0;
            var input = new SimplePocoClass {
                A = 30
            };
            var output = fixture.SerializationManager.RoundTripSerializationForTesting(input);

            Assert.Equal(2, SimplePocoClassSerializer.CallCounter);
            Assert.Equal(input.A, output.A);
        }