Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
96malhar committed Oct 30, 2024
1 parent 299265b commit 662930d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
#pragma warning disable 1574

using Amazon.Runtime.Telemetry.Tracing;
using System.Threading;
using System.Threading.Tasks;

Expand Down
10 changes: 10 additions & 0 deletions sdk/test/Services/DynamoDBv2/UnitTests/Custom/DynamoDBTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,9 @@ public void DisableFetchingTableMetadata_KeyWithConverter_DateTimeToString()
request.Key.ContainsKey("CreationDate") &&
request.Key["CreationDate"].S == "0001-01-01T00:00:00.000Z")));


mock.Verify(x => x.Config, Times.AtLeastOnce());

mock.VerifyNoOtherCalls();
}

Expand All @@ -514,6 +517,9 @@ public void DisableFetchingTableMetadata_KeyWithConverter_DateTimeToNumber()
request.Key.ContainsKey("CreationDate") &&
request.Key["CreationDate"].N == "1024")));


mock.Verify(x => x.Config, Times.AtLeastOnce());

mock.VerifyNoOtherCalls();
}

Expand All @@ -539,6 +545,8 @@ public void DisableFetchingTableMetadata_KeyWithConverter_DateTimeToBinary()
request.Key.ContainsKey("CreationDate") &&
BitConverter.ToString(request.Key["CreationDate"].B.ToArray()) == "00-04-00-00-00-00-00-40")));

mock.Verify(x => x.Config, Times.AtLeastOnce());

mock.VerifyNoOtherCalls();
}

Expand All @@ -556,6 +564,8 @@ public void DisableFetchingTableMetadata_KeyWithConverter_DateTimeToBool_ThrowsE
Assert.ThrowsException<InvalidOperationException>(() =>
context.Load<HashKeyConverter_DateTimeToBool>(new DateTime(1024, DateTimeKind.Utc)));

mock.Verify(x => x.Config, Times.AtLeastOnce());

mock.VerifyNoOtherCalls();
}

Expand Down

0 comments on commit 662930d

Please sign in to comment.