Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to mock document model operations in DynamoDB #3446

Merged
merged 7 commits into from
Aug 21, 2024

Conversation

96malhar
Copy link
Contributor

Description

This PR adds the ability to mock document model operations in DynamoDB:

  • Mock table operations by introducing the ITable interface.
  • Mock query and scan operations by introducing the ISearch interface.
  • Mock TransactWrite operations by introducing the IDocumentTransactWrite and IMultiTableDocumentTransactWrite interfaces.
  • Mock TransactGet operations by introducing the IDocumentTransactGet and IMultiTableDocumentTransactGet interfaces.
  • Mock BatchWrite operations by introducing the IDocumentBatchWrite and IMultiTableDocumentBatchWrite interfaces.
  • Mock BatchGet operations by introducing the IDocumentBatchGet and IMultiTableDocumentBatchGet interfaces.

I have added new unit tests to showcase how a user will mock these interfaces.

Motivation and Context

DOTNET-7677

Testing

  • Added new unit tests.
  • All existing unit and integration tests pass.

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed

License

  • I confirm that this pull request can be released under the Apache 2 license

@96malhar 96malhar requested review from normj and philasmar August 19, 2024 01:13
@96malhar 96malhar force-pushed the kmalhar/mock-document-model branch from 4ae7483 to 5f7d866 Compare August 19, 2024 01:14
Copy link
Contributor

@philasmar philasmar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hit Approve by mistake

@philasmar philasmar self-requested a review August 20, 2024 20:06
@96malhar 96malhar force-pushed the kmalhar/mock-document-model branch from a26f8fd to c47c3c2 Compare August 21, 2024 22:09
@96malhar 96malhar merged commit fffef38 into feature/v4-ddb-mock Aug 21, 2024
1 check passed
96malhar added a commit that referenced this pull request Aug 21, 2024
* Add the ability to mock DocumentBatchGet and MultiTableDocumentBatchGet operations

* Add the ability to mock DocumentBatchWrite and MultiTableDocumentBatchWrite operations

* Add the ability to mock DocumentTransactGet and MultiTableDocumentTransactGet operations

* Add the ability to mock DocumentTransactWrite and MultiTableDocumentTransactWrite operations

* Add the ability to mock Search operations in Document model

* Add the ability to mock Table operations in Document model

* Fix typos
@dscpinheiro dscpinheiro deleted the kmalhar/mock-document-model branch August 24, 2024 00:04
philasmar pushed a commit that referenced this pull request Aug 26, 2024
* Add the ability to mock DocumentBatchGet and MultiTableDocumentBatchGet operations

* Add the ability to mock DocumentBatchWrite and MultiTableDocumentBatchWrite operations

* Add the ability to mock DocumentTransactGet and MultiTableDocumentTransactGet operations

* Add the ability to mock DocumentTransactWrite and MultiTableDocumentTransactWrite operations

* Add the ability to mock Search operations in Document model

* Add the ability to mock Table operations in Document model

* Fix typos
@96malhar 96malhar added the v4 label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants