[InlineData(13, "A16249640D")] // { "Id": 13}
        public void TestAutomaticMethod(int id, string hexBuffer)
        {
            ObjectWithShouldSerialize obj = new ObjectWithShouldSerialize
            {
                Id = id
            };

            Helper.TestWrite(obj, hexBuffer);
        }
示例#2
0
        public void TestAutomaticMethod(int id, string json)
        {
            ObjectWithShouldSerialize obj = new ObjectWithShouldSerialize
            {
                Id = id
            };

            JsonSerializerOptions options = new JsonSerializerOptions();

            options.SetupExtensions();

            Helper.TestWrite(obj, json, options);
        }