Skip to content

Test Cleanup & CI Fixes#28

Merged
Turnerj merged 9 commits intomasterfrom
test-cleanup
Apr 26, 2018
Merged

Test Cleanup & CI Fixes#28
Turnerj merged 9 commits intomasterfrom
test-cleanup

Conversation

@Turnerj
Copy link
Copy Markdown
Member

@Turnerj Turnerj commented Apr 25, 2018

Started with organising the tests to match the folder structure of the main library. Continued to have the tests inherit from the same base (allowing easier cleanup per test - particularly around cleaning up the MongoDB driver) however will also include fixing up some neglected test cases.

This also helps get the tests in a better shape for another refactor/rename of core components in the main library.

@Turnerj Turnerj added this to the Version 1 milestone Apr 25, 2018
@Turnerj Turnerj self-assigned this Apr 25, 2018
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 25, 2018

Codecov Report

Merging #28 into master will decrease coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #28      +/-   ##
==========================================
- Coverage   93.43%   93.38%   -0.06%     
==========================================
  Files          53       54       +1     
  Lines        1736     1753      +17     
==========================================
+ Hits         1622     1637      +15     
- Misses        114      116       +2
Impacted Files Coverage Δ
MongoFramework/MongoDbContextOptions.cs 100% <100%> (ø)
MongoFramework/Infrastructure/MongoDbUtility.cs 100% <100%> (ø) ⬆️
MongoFramework/MongoDbContext.cs 71.83% <100%> (+2.13%) ⬆️
...ture/EntityRelationships/EntityMapperExtensions.cs 96.87% <0%> (-3.13%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 77f3eb4...dd6eb26. Read the comment docs.

Turnerj added 5 commits April 25, 2018 18:21
A few of the tests couldn't run in .Net Core (due to how configuration management works). To work around that for all .Net versions, a new interface for the MongoDbContext that takes an IMongoDbContextOptions parameter that allows specifying the connection string and name.
@Turnerj
Copy link
Copy Markdown
Member Author

Turnerj commented Apr 25, 2018

Test project has been migrated to new .csproj format and now builds both .Net 4.6.1 and .Net Core 2.0 for testing.

Due to a difference with how .Net Core supports configuration, there is a slight decrease in functionality/usage in .Net Core around creating contexts via connection string name. There is a new constructor that allows passing in an "options" object that allows configuring the same type of data (connection string and database). This "options" object follows similar functionality in EF Core.

@Turnerj Turnerj changed the title Test Cleanup Test Cleanup & CI Fixes Apr 26, 2018
@Turnerj Turnerj merged commit 2553062 into master Apr 26, 2018
@Turnerj Turnerj deleted the test-cleanup branch April 27, 2018 13:56
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