KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
new to unit testing. I have a unit of work that I am trying to unit test. I am probably missing something simple here. I am trying to unit test the Commit method. I am using nunit and moq. public class UnitOfWork : IUnitOfWork { private readonly DbContext _context; public UnitOfWork(DbContext ctx) { _context = ctx; } public void Commit() { _context.SaveChanges(); } } What do I need to do to test this?
Tags (comma-separated)
Save Edits
Cancel