public async Task Test_List_Ctor_Object_Buffer(int len) { BinarySerializerOptions options = new BinarySerializerOptions() { DefaultBufferSize = 1 }; TestListA a1 = new TestListA { new TestCtorB(new string('A', len), 1), createComplexCtorC(len), createComplexCtorC(len), null, createComplexCtorC(len), null }; a1.A = new string('A', len); TestListCtorObj obj = new TestListCtorObj(a1); await Test(obj, b => { CheckIEnumerableOfList(obj.A, (a, b) => checkCtorCProc(a)(b)); Assert.Equal(obj.A.GetType(), b.A.GetType()); if (obj.A is TestListA ta) { Assert.Equal(ta.A, (b.A as TestListA).A); } }, options); }
public async Task Test_List_Ctor_Object() { List <TestCtorA> a1 = new List <TestCtorA>() { createComplexCtorC(1), createComplexCtorC(2), null, createComplexCtorC(3), null }; TestListCtorObj obj = new TestListCtorObj(a1); await Test(obj, b => { CheckIEnumerableOfList(obj.A, (a, b) => checkCtorCProc(a)(b)); }); }