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

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

            Object(dictionary).RoundTrips(ExpectJson);
        }