public void CallGetComicEngine_MustReturnEngineInstance() { var eng = new ComicEngine(); var provider = new ValueServiceProvider { ServiceMap = new Dictionary <Type, Func <object> > { [typeof(ComicEngine)] = () => eng } }; var retEng = ComicHostExtensions.GetComicEngine(provider); Assert.AreEqual(eng, retEng); }
public void GivenNullValue_CallGetComicEngine_MustThrowException() { Assert.ThrowsException <ArgumentNullException>(() => ComicHostExtensions.GetComicEngine(null)); }