Example #1
0
        public void CanSerializeCustomGenericIReadOnlyDictionary()
        {
            var dictionary = new MyGenericIReadOnlyDictionary(new Dictionary <object, object>
            {
                { "Key1", "value1" },
                { "Key2", "value2" },
            });

            this.AssertSerializesAndRoundTrips(dictionary);
        }
Example #2
0
        public void CanSerializeCustomGenericIReadOnlyDictionary()
        {
            var dictionary = new MyGenericIReadOnlyDictionary(new Dictionary <object, object>
            {
                { "Key1", "value1" },
                { "Key2", "value2" },
            });

            Object(dictionary).RoundTrips(ExpectJson);
        }