Beispiel #1
0
        public void CallAddStreamVisitor_ServiceCollectionMustContainesServices()
        {
            var services = new ServiceCollection();

            EasyComicBuilderExtensions.AddStreamVisitor(services);
            Assert.IsTrue(services.Any(x => x.ServiceType == typeof(IResourceFactoryCreator <Stream>)));
            Assert.IsTrue(services.Any(x => x.ServiceType == typeof(IComicVisiting <Stream>)));
        }
Beispiel #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));
 }