Skip to content

feat: add MongoDB serializer registration and service collection exte…#65

Merged
codedesignplus merged 1 commit intodevfrom
feature/integrate-nodatime
Jan 21, 2025
Merged

feat: add MongoDB serializer registration and service collection exte…#65
codedesignplus merged 1 commit intodevfrom
feature/integrate-nodatime

Conversation

@codedesignplus
Copy link
Collaborator

This pull request includes several changes to the CodeDesignPlus.Net.Mongo and CodeDesignPlus.Net.Redis packages, focusing on adding new functionalities and improving existing test cases. The most important changes include the addition of MongoDB serializer registration methods, extension methods for adding MongoDB services, and various test case updates.

MongoDB Enhancements:

  • MongoSerializerRegistration.cs: Introduced methods to register custom BSON serializers for MongoDB, including GuidSerializer, InstantSerializer, and NullableInstantSerializer.
  • ServiceCollectionExtension.cs: Added extension methods to register MongoDB services, including diagnostics and automatic repository registration.

Test Case Updates:

  • ServiceCollectionExtensionsTest.cs: Updated test cases to use MongoCollectionFixture instead of MongoContainer for better consistency and reliability. [1] [2]
  • OperationBaseTest.cs: Added comprehensive test cases for CreateAsync, DeleteAsync, and UpdateAsync methods to ensure proper functionality of the MongoDB operations.
  • RepositoryBaseTest.cs: Modified the test class to use MongoCollectionFixture and updated the constructor accordingly. [1] [2]

Redis Test Case Updates:

  • RedisPubSubServiceTest.cs and RedisServiceTest.cs: Updated test classes to use RedisCollectionFixture instead of RedisContainer and adjusted test methods to reflect this change. [1] [2] [3] [4] [5] [6] [7] [8] [9]

@codedesignplus codedesignplus merged commit cbd552c into dev Jan 21, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant