File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
sdk/test/Services/DynamoDBv2/UnitTests/Custom Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,34 @@ public void TestConvertingMapIfNullSet()
92
92
Assert . AreEqual ( "testvalue" , dynamoDocument [ "testmap" ] . AsDocument ( ) [ "test" ] . AsString ( ) ) ;
93
93
}
94
94
95
+
96
+ [ TestMethod ]
97
+ [ TestCategory ( "DynamoDBv2" ) ]
98
+ public void TestConvertingListContainsEmptyMapToJson ( )
99
+ {
100
+ var initialAttributeMap = new Dictionary < string , AttributeValue >
101
+ {
102
+ { "testlist" , new AttributeValue
103
+ {
104
+ L = new List < AttributeValue >
105
+ {
106
+ new AttributeValue
107
+ {
108
+ M = new Dictionary < string , AttributeValue > ( ) ,
109
+ }
110
+ }
111
+ }
112
+ }
113
+ } ;
114
+
115
+ var document = Document . FromAttributeMap ( initialAttributeMap ) ;
116
+ var result = document . ToJson ( ) ;
117
+
118
+
119
+ Assert . IsNotNull ( result ) ;
120
+ Assert . AreEqual ( document [ "testlist" ] . AsListOfDocument ( ) . Count , 0 ) ;
121
+ }
122
+
95
123
private static List < Type > GetSubTypes ( Type baseType )
96
124
{
97
125
var assembly = baseType . Assembly ;
You can’t perform that action at this time.
0 commit comments