示例#1
0
        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);
        }
示例#2
0
 public void GivenNullValue_CallGetComicEngine_MustThrowException()
 {
     Assert.ThrowsException <ArgumentNullException>(() => ComicHostExtensions.GetComicEngine(null));
 }