-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
feat(unit-tests): increase code coverage #251
Conversation
This commit adds: - Pull request template - Unit tests for `DbCommandInterceptorProcessor` class - Unit tests for `SecondLevelCacheInterceptor` class - The task is to run unit tests after the build
PR Summary
|
_cacheSettings.SkipCachingDbContexts = new List<Type> { context.GetType() }; | ||
|
||
// Act | ||
var actual = _processor.ProcessExecutedCommands(command, context, result); |
Check warning
Code scanning / CodeQL
Useless assignment to local variable Warning
actual
// Assert | ||
_cacheServiceMock.Verify(x => x.InsertValue( | ||
efCacheKey, | ||
It.Is<EFCachedData>(data => data.Scalar == result), |
Check warning
Code scanning / CodeQL
Reference equality test on System.Object Warning
this
// Assert | ||
_cacheServiceMock.Verify(x => x.InsertValue( | ||
efCacheKey, | ||
It.Is<EFCachedData>(data => data.Scalar == result), |
Check warning
Code scanning / CodeQL
Reference equality test on System.Object Warning
this
This commit fixes a unit test that failed due to cultural differences.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
DbCommandInterceptorProcessor
classSecondLevelCacheInterceptor
classWhat is the new behavior?
DbCommandInterceptorProcessor
class is covered by100%
SecondLevelCacheInterceptor
class is covered by98%
Overall code coverage increased from
19%
to35%
:Does this PR introduce a breaking change?
Other information
This work improves the overall quality of the project.
Best Regards,
Dmitrii Kiselev