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

Project Setup (Part 1) #5

Draft
wants to merge 21 commits into
base: master
Choose a base branch
from
Draft

Project Setup (Part 1) #5

wants to merge 21 commits into from

Conversation

StefanGreve
Copy link
Member

@StefanGreve StefanGreve commented Aug 10, 2024

TODO

  • Auto-generate Documentation with docfx #2
  • Implement DbConnectionService<T>
  • Implement DbConnectionServiceFactory<T, U>
  • Add Makefile
  • Update GitHub Actions script (cf. AdvancedSystems.Security)
  • Add documentation for IDbConnectionService
  • Add documentation for IDbConnectionServiceFactory
  • Chore: Update Dependencies
  • Check if Directory.Build.Props needs any updating
  • Update readme.md

Unit Tests (DbConnectionService)

  • TestExecuteQuery
  • ExecuteQueryAsync
  • TestExecuteNonQuery
  • ExecuteNonQueryAsync
  • TestAddDbConnectionService_FromOptions
  • TestAddDbConnectionService_FromAppSettings

Unit Tests (DatabaseConnectionFactory)

  • TestAddDbConnectionServiceFactory_FromOptions
  • TestAddDbConnectionServiceFactory_FromAppSettings
  • Option Layering between <T> and <U>

Notes

  • The current implementation of MsSqlServerConnectionService is tightly coupled to an SqlConnection instance. Refactor the DatabaseConnectionFactory appropriately to make writing unit tests feasible.
  • Use an in-memory message bus for configuring a specific provider, then rename MsSqlServerConnectionService to DatabaseConnectionService and listen to the broadcast.
  • Idea: Send a signal from DatabaseConnectionFactory to request a connection service as singleton
  • TODO: Rename MsSqlServerExtensions to DatabaseExtensions, and supply a more generic implementation of CreateConnectionString. Think about how this would affect the MsSqlServerSettings... maybe rename it to MsSqlOptions?
  • TODO: Think about a solid strategy for implementing the DbOptionsFactory (cf. WIP f4b111e)

SwisslabConnectionInterfaces drawio

@StefanGreve StefanGreve added documentation Improvements or additions to documentation enhancement New feature or request devops Modify CI/CD scripts tests Work on test suite labels Aug 10, 2024
@StefanGreve StefanGreve added this to the Version 8.0.0-alpha milestone Aug 10, 2024
@StefanGreve StefanGreve self-assigned this Aug 10, 2024
This was linked to issues Aug 10, 2024
* rename region names
* add doc strings to DatabaseOptions
* remove IDatabaseConnectionServiceFactory and DatabaseConnectionServiceFactory
* add IOptions<DatabaseOptions> to DatabaseConnectionService
* update unit tests
@StefanGreve StefanGreve changed the title Project Setup Project Setup (Part 1) Oct 6, 2024
* create DbCommandFactory (because dbConnection.CreateCommand cannot
  be mocked without this additional abstraction)
* implement first unit test as proof of concept (ExecuteQuery)
* add DbProvider.Generic (WIP)
* add some more documentation via doc strings
* implement CreateDbDataAdapter method for DbProvider.Generic (DbCommand)
  in DbDataAdapterFactory
* remove backup project file that was added in error in the test project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops Modify CI/CD scripts documentation Improvements or additions to documentation enhancement New feature or request tests Work on test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Project Setup Mutation Testing
1 participant