public void Should_query_primitive_value_injected_as_variable_closure(Type type, object value) { Skip.If(this.TestIs <With_xml_serializer>() && type.Is <DateTimeOffset>(), $"{type} not supported by With_xml_serializer"); Skip.If(this.TestIs <With_xml_serializer>() && type.Is <TimeSpan>(), $"{type} not supported by With_xml_serializer"); Skip.If(this.TestIs <With_xml_serializer>() && type.Is <BigInteger>(), $"{type} not supported by With_xml_serializer"); Skip.If(this.TestIs <With_xml_serializer>() && type.Is <Complex>(), $"{type} not supported by With_xml_serializer"); if (this.TestIs <With_protobuf_net_serializer>()) { ProtobufNetSerializationHelper.SkipUnsupportedDataType(type, value); } if (this.TestIs <With_system_text_json_serializer>()) { SystemTextJsonSerializationHelper.SkipUnsupportedDataType(type, value); } #if NET5_0_OR_GREATER Skip.If(type.Is <Half>(), $"{type} not supported by serializers"); #endif // NET5_0_OR_GREATER RunTestMethod( nameof(TestMethodFor_Should_query_primitive_value_injected_as_variable_closure), type, value); }
public With_system_text_json_serializer() : base(x => (Expression)SystemTextJsonSerializationHelper.Clone(x, x.GetType())) { }