Hot answers tagged

3 votes

EFCore In Memory repository Unit Test of Encrypted data

My opinion is to not bother with encryption in business-facing tests, but test it in integration tests that verify validity of schema againts real database. Usually, I have two sets of tests. One that ...
Euphoric's user avatar
  • 37.3k
1 vote

EFCore In Memory repository Unit Test of Encrypted data

Yes, if the context returns encrypted data which is then decoded in the repository you mocked repository should also contain encrypted data. Otherwise the test will fail. If the encryption itself can ...
Ewan's user avatar
  • 74.7k
1 vote

Will I lose confidence of my code working in mocking dependency injected services?

Now that I've read your question a bit more thoroughly, I think the problem lies in you being unclear about what the public API of the IMagic type is, and how the return value figures in it. (It is ...
Filip Milovanović's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible