Example #1
0
        public void CallAddDefaultEasyComic(NetworkAdapterTypes type)
        {
            var services = new ServiceCollection();

            EasyComicBuilderExtensions.AddDefaultEasyComic(services, type);
            var se = services.BuildServiceProvider()
                     .GetRequiredService <SearchEngine>();

            Assert.IsNotNull(se);
        }
Example #2
0
 public void GivenNullValue_MustThrowException()
 {
     Assert.ThrowsException <ArgumentNullException>(() => EasyComicBuilderExtensions.AddEasyComic(null, NetworkAdapterTypes.HttpClient));
     Assert.ThrowsException <ArgumentNullException>(() => EasyComicBuilderExtensions.AddDefaultEasyComic(null, NetworkAdapterTypes.HttpClient));
     Assert.ThrowsException <ArgumentNullException>(() => EasyComicBuilderExtensions.AddStreamVisitor(null));
 }