6

I’m trying to write a unit test in c# and I need to mock the response of the method CreateBatchWrite<T> using Moq but I can’t instantiate an object of the BatchWrite<T> object. I’m doing this:

this.dynamoDbMock
    .Setup(m => m.CreateBatchWrite<SomeType>(It.IsAny<DynamoDBOperationConfig>()))
    .Returns(Mock.Of<BatchWrite<SomeType>>());

Any idea of how can I mock this object. Thank you!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.