public void GenericPocosCanRoundTrip() { var original = new GenericPoco <string> { ArrayField = new[] { "a", "bb", "ccc" }, Field = Guid.NewGuid().ToString("N") }; var result = (GenericPoco <string>) this.RoundTripThroughUntypedSerializer(original); Assert.Equal(original.ArrayField, result.ArrayField); Assert.Equal(original.Field, result.Field); }
public void GenericPocosCanRoundTrip() { var original = new GenericPoco <string> { ArrayField = new[] { "a", "bb", "ccc" }, Field = Guid.NewGuid().ToString("N") }; var result = (GenericPoco <string>)RoundTripThroughUntypedSerializer(original, out var formattedBitStream); Assert.Equal(original.ArrayField, result.ArrayField); Assert.Equal(original.Field, result.Field); Assert.Contains("gpoco`1", formattedBitStream); }
public void NestedGenericPocoWithTypeAlias() { var original = new GenericPoco <GenericPoco <string> > { Field = new GenericPoco <string> { Field = Guid.NewGuid().ToString("N") } }; RoundTripThroughUntypedSerializer(original, out var formattedBitStream); Assert.Contains("gpoco`1[[gpoco`1[[string]]]]", formattedBitStream); }