Skip to content

Commit 9551733

Browse files
authored
Update FunctionTest.cs
Signed-off-by: Henrique Graca <999396+hjgraca@users.noreply.github.com>
1 parent 2ebdc8b commit 9551733

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

examples/BatchProcessing/test/HelloWorld.Test/FunctionTest.cs

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
using System.IO;
1818
using System.Text;
1919
using System.Threading.Tasks;
20+
using Amazon.DynamoDBv2.Model;
2021
using Amazon.Lambda.DynamoDBEvents;
2122
using Amazon.Lambda.KinesisEvents;
2223
using Amazon.Lambda.SQSEvents;
@@ -237,47 +238,47 @@ public Task TestDynamoDb()
237238
new()
238239
{
239240
EventID = "1",
240-
Dynamodb = new DynamoDBEvent.StreamRecord
241+
Dynamodb = new StreamRecord
241242
{
242-
Keys = new Dictionary<string, DynamoDBEvent.AttributeValue>
243+
Keys = new Dictionary<string, AttributeValue>
243244
{
244-
{ "Id", new DynamoDBEvent.AttributeValue { N = "1" } }
245+
{ "Id", new AttributeValue { N = "1" } }
245246
},
246-
NewImage = new Dictionary<string, DynamoDBEvent.AttributeValue>
247+
NewImage = new Dictionary<string, AttributeValue>
247248
{
248-
{ "Product", new DynamoDBEvent.AttributeValue { S = "{\"Id\":1,\"Name\":\"product-name\",\"Price\":14}" } }
249+
{ "Product", new AttributeValue { S = "{\"Id\":1,\"Name\":\"product-name\",\"Price\":14}" } }
249250
},
250251
SequenceNumber = "1"
251252
}
252253
},
253254
new()
254255
{
255256
EventID = "1",
256-
Dynamodb = new DynamoDBEvent.StreamRecord
257+
Dynamodb = new StreamRecord
257258
{
258-
Keys = new Dictionary<string, DynamoDBEvent.AttributeValue>
259+
Keys = new Dictionary<string, AttributeValue>
259260
{
260-
{ "Id", new DynamoDBEvent.AttributeValue { N = "1" } }
261+
{ "Id", new AttributeValue { N = "1" } }
261262
},
262-
NewImage = new Dictionary<string, DynamoDBEvent.AttributeValue>
263+
NewImage = new Dictionary<string, AttributeValue>
263264
{
264-
{ "Product", new DynamoDBEvent.AttributeValue { S = "failure" } }
265+
{ "Product", new AttributeValue { S = "failure" } }
265266
},
266267
SequenceNumber = "2"
267268
}
268269
},
269270
new()
270271
{
271272
EventID = "1",
272-
Dynamodb = new DynamoDBEvent.StreamRecord
273+
Dynamodb = new StreamRecord
273274
{
274-
Keys = new Dictionary<string, DynamoDBEvent.AttributeValue>
275+
Keys = new Dictionary<string, AttributeValue>
275276
{
276-
{ "Id", new DynamoDBEvent.AttributeValue { N = "1" } }
277+
{ "Id", new AttributeValue { N = "1" } }
277278
},
278-
NewImage = new Dictionary<string, DynamoDBEvent.AttributeValue>
279+
NewImage = new Dictionary<string, AttributeValue>
279280
{
280-
{ "Product", new DynamoDBEvent.AttributeValue { S = "{\"Id\":1,\"Name\":\"product-name\",\"Price\":14}" } }
281+
{ "Product", new AttributeValue { S = "{\"Id\":1,\"Name\":\"product-name\",\"Price\":14}" } }
281282
},
282283
SequenceNumber = "3"
283284
}

0 commit comments

Comments
 (0)