コード例 #1
0
        public void SerializationTests_GrainStateWithMetaDataAndETag_CopyNonSerializableView()
        {
            GrainStateWithMetaDataAndETag <AdvancedPOCO> input = new GrainStateWithMetaDataAndETag <AdvancedPOCO>("eTag", new AdvancedPOCO {
                A = 1, B = 2
            }, 1, "writeVector");

            GrainStateWithMetaDataAndETag <AdvancedPOCO> output = (GrainStateWithMetaDataAndETag <AdvancedPOCO>)fixture.SerializationManager.DeepCopy(input);

            Assert.Equal(input.ToString(), output.ToString());
        }
コード例 #2
0
        public void SerializationTests_GrainStateWithMetaDataAndETag_NonSerializableView()
        {
            GrainStateWithMetaDataAndETag <AdvancedPOCO> input = new GrainStateWithMetaDataAndETag <AdvancedPOCO>(new AdvancedPOCO {
                A = 1, B = 2
            });

            GrainStateWithMetaDataAndETag <AdvancedPOCO> output = fixture.RoundTripSerialization(input);

            Assert.Equal(input.ToString(), output.ToString());
        }