{
public SocketsHttpHandlerTest_PlaintextStreamFilter(ITestOutputHelper output) : base(output) { }
- public static IEnumerable<object> PlaintextStreamFilter_ContextHasCorrectProperties_Success_MemberData() =>
+ public static IEnumerable<object[]> PlaintextStreamFilter_ContextHasCorrectProperties_Success_MemberData() =>
from useSsl in new[] { false, true }
from syncRequest in new[] { false, true }
from syncCallback in new[] { false, true }
Assert.Contains(type.ToString(), ex.ToString());
}
- private static IEnumerable<object[]> CustomInterfaces_Enumerables()
+ public static IEnumerable<object[]> CustomInterfaces_Enumerables()
{
yield return new object[] { typeof(IDerivedICollectionOfT<string>) };
yield return new object[] { typeof(IDerivedIList) };
yield return new object[] { typeof(IDerivedISetOfT<string>) };
}
- private static IEnumerable<object[]> CustomInterfaces_Dictionaries()
+ public static IEnumerable<object[]> CustomInterfaces_Dictionaries()
{
yield return new object[] { typeof(IDerivedIDictionaryOfTKeyTValue<string, string>) };
}
private static IEnumerable<bool> WriteIndented
=> new[] { true, false };
- private static IEnumerable<object[]> TestData(bool enumeratePayloadTweaks)
+ public static IEnumerable<object[]> TestData(bool enumeratePayloadTweaks)
{
// The serialized json gets padded with leading ' ' chars. The length of the
// incrementing paddings, leads to continuations at every position of the payload.
private class Test<T> { }
- private static IEnumerable<object[]> OpenGenericTypes()
+ public static IEnumerable<object[]> OpenGenericTypes()
{
yield return new object[] { typeof(Test<>) };
yield return new object[] { typeof(Nullable<>) };
yield return new object[] { typeof(Dictionary<,>).MakeGenericType(typeof(Nullable<>), typeof(string)) };
}
- private static IEnumerable<object[]> OpenGenericTypes_ToSerialize()
+ public static IEnumerable<object[]> OpenGenericTypes_ToSerialize()
{
yield return new object[] { typeof(Test<>) };
yield return new object[] { typeof(List<>) };
yield return new object[] { typeof(Dictionary<,>) };
}
- private static IEnumerable<object[]> RefStructTypes()
+ public static IEnumerable<object[]> RefStructTypes()
{
yield return new object[] { typeof(Span<int>) };
yield return new object[] { typeof(Utf8JsonReader) };
private static readonly Type s_intPtrType = typeof(int*); // Unsafe code may not appear in iterators.
- private static IEnumerable<object[]> PointerTypes()
+ public static IEnumerable<object[]> PointerTypes()
{
yield return new object[] { s_intPtrType };
}
// to the serializer on serialization due to type constraints,
// e.g. int* can't be boxed and passed to the non-generic overload,
// and typeof(int*) can't be a generic parameter to the generic overload.
- private static IEnumerable<object[]> TypesWithInvalidMembers_WithMembers()
+ public static IEnumerable<object[]> TypesWithInvalidMembers_WithMembers()
{
yield return new object[] { typeof(Memory<byte>), typeof(Span<byte>), "Span" }; // Contains Span<byte> property.
JsonTestHelper.AssertJsonEqual(json, JsonSerializer.Serialize(result, options));
}
- private static IEnumerable<object[]> NumberHandling_ForPropsReadAfter_DeserializingCtorParams_TestData()
+ public static IEnumerable<object[]> NumberHandling_ForPropsReadAfter_DeserializingCtorParams_TestData()
{
yield return new object[]
{
}
}
- private static IEnumerable<object[]> JsonIgnoreConditionWhenWritingDefault_ClassProperty_TestData()
+ public static IEnumerable<object[]> JsonIgnoreConditionWhenWritingDefault_ClassProperty_TestData()
{
yield return new object[] { typeof(ClassWithClassProperty_IgnoreConditionWhenWritingDefault), new JsonSerializerOptions() };
yield return new object[] { typeof(ClassWithClassProperty_IgnoreConditionWhenWritingDefault_Ctor), new JsonSerializerOptions { IgnoreNullValues = true } };
}
}
- private static IEnumerable<object[]> JsonIgnoreConditionWhenWritingDefault_StructProperty_TestData()
+ public static IEnumerable<object[]> JsonIgnoreConditionWhenWritingDefault_StructProperty_TestData()
{
yield return new object[] { typeof(ClassWithStructProperty_IgnoreConditionWhenWritingDefault), new JsonSerializerOptions() };
yield return new object[] { typeof(StructWithStructProperty_IgnoreConditionWhenWritingDefault_Ctor), new JsonSerializerOptions { IgnoreNullValues = true } };
}
}
- private static IEnumerable<object[]> JsonIgnoreConditionNever_TestData()
+ public static IEnumerable<object[]> JsonIgnoreConditionNever_TestData()
{
yield return new object[] { typeof(ClassWithStructProperty_IgnoreConditionNever) };
yield return new object[] { typeof(ClassWithStructProperty_IgnoreConditionNever_Ctor) };