Esempio n. 1
0
        public void MapAttribute_Value_Mapped_Success()
        {
            var input = new Dictionary <string, AttributeValue>
            {
                {
                    "Test",
                    new AttributeValue
                    {
                        S = "Apple"
                    }
                },
                {
                    "MapTest",
                    new AttributeValue
                    {
                        M = new Dictionary <string, AttributeValue>()
                        {
                            { "TestKey", new AttributeValue("Apple") }
                        }
                    }
                }
            };

            var results = DynamoStreamMapper <TestClass> .Convert(input);

            Assert.Equal("Apple", results.MapTestClass.MapTestProp);
        }
Esempio n. 2
0
        public void StringAttribute_Value_Mapped_Success()
        {
            var input = new Dictionary <string, AttributeValue>
            {
                {
                    "Test",
                    new AttributeValue
                    {
                        S = "Apple"
                    }
                }
            };

            var results = DynamoStreamMapper <TestClass> .Convert(input);

            Assert.Equal("Apple", results.Test);
        }