AddDbContext method for DI

Be good not to need it. Is there a way to test without needing access to internals, or can stuff be factored differently to test without needing access?