public void ConstantExpressionShouldDeserialize(ConstantExpression constant)
        {
            var serialized   = TestSerializer.GetSerializedFragment <Constant, ConstantExpression>(constant);
            var deserialized = serializer.Deserialize(serialized, new SerializationState());

            Assert.True(ExpressionEquivalency.ValuesAreEquivalent(constant.Value, deserialized.Value));
        }
예제 #2
0
        public void ConstantExpressionShouldDeserialize(ConstantExpression constant)
        {
            var serialized   = serializer.Serialize(constant, TestSerializer.GetDefaultState());
            var deserialized = serializer.Deserialize(serialized, TestSerializer.State);

            Assert.True(evaluator.ValuesAreEquivalent(constant.Value, deserialized.Value));
        }