public void Dispose_DiposesContext() { AContext context = Substitute.For <AContext>(); UnitOfWork unitOfWork = new UnitOfWork(context); unitOfWork.Dispose(); context.Received().Dispose(); }