Beispiel #1
0
        public void TestDictionaryConverterFrom()
        {
            // ARRANGE
            Dictionary <string, long> dict = new Dictionary <string, long>()
            {
                { "1", 2 }, { "3", 4 }
            };
            DictionaryConverter <string, long> converter = new DictionaryConverter <string, long>();
            DynamoDBEntry entry = new Primitive()
            {
                Value = JsonConvert.SerializeObject(dict)
            };

            // ACT

            object data = converter.FromEntry(entry);
            Dictionary <string, long> derived = (Dictionary <string, long>)data;

            // ASSERT
            Assert.Equal(dict, derived);
        }