I am writing unit test/Component test using Entity Framework Core InMemory Provider.
When I write unit test, I came across with the following question.
I have the following two BL/DL methods.
ToCreate
ToGet
So when I write a unit test, I need to create some sample data for the unit test.
When I write a unit test for ToGet
method, can I use ToCreate
(BL method) to create sample data or When I write a unit test for ToCreate
, Can I use ToGet
method to check the created data? Is that a correct choice?
Referred the following to create a unit test: https://www.youtube.com/watch?v=ddrR440JtiA
Aucun commentaire:
Enregistrer un commentaire