Skip to content

Commit 5bef14f

Browse files
committed
Used interface instead of the class itself to build DynamoDbClient mocks
1 parent b7c2985 commit 5bef14f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/Albelli.Extensions.Caching.Tests.Integration/DynamoDbCacheServiceCollectionExtensionsTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public void ServiceProvider_Is_Retrieved_Successfully_With_A_DynamoDbClient_Regi
4747
{
4848
o.TableName = "test";
4949
});
50-
serviceCollection.AddSingleton<IAmazonDynamoDB>(m => new Mock<AmazonDynamoDBClient>().Object);
50+
serviceCollection.AddSingleton<IAmazonDynamoDB>(m => new Mock<IAmazonDynamoDB>().Object);
5151
var serviceProvider = serviceCollection.BuildServiceProvider();
5252
Assert.NotNull(serviceProvider.GetService(typeof(IDistributedCache)));
5353
}
@@ -59,7 +59,7 @@ public void ServiceProvider_Is_Retrieved_Successfully_With_A_Manually_Provided_D
5959
serviceCollection.AddDynamoDbCache(o =>
6060
{
6161
o.TableName = "test";
62-
o.CustomDynamoDbClient = new Mock<AmazonDynamoDBClient>().Object;
62+
o.CustomDynamoDbClient = new Mock<IAmazonDynamoDB>().Object;
6363
});
6464
var serviceProvider = serviceCollection.BuildServiceProvider();
6565
Assert.NotNull(serviceProvider.GetService(typeof(IDistributedCache)));

0 commit comments

Comments
 (0)