Пример #1
0
        public void CreateProvider_NullParameter()
        {
            var npmPackageSearch   = new Mock <INpmPackageSearch>();
            var packageInfoFactory = new Mock <INpmPackageInfoFactory>();

            var       factory  = new JsDelivrProviderFactory(npmPackageSearch.Object, packageInfoFactory.Object);
            IProvider provider = factory.CreateProvider(null);
        }
Пример #2
0
        public void CreateProvider_Success()
        {
            var       factory  = new JsDelivrProviderFactory();
            IProvider provider = factory.CreateProvider(_hostInteraction);

            Assert.AreSame(_hostInteraction.WorkingDirectory, provider.HostInteraction.WorkingDirectory);
            Assert.AreSame(_hostInteraction.CacheDirectory, provider.HostInteraction.CacheDirectory);
            Assert.IsFalse(string.IsNullOrEmpty(provider.Id));
        }
Пример #3
0
        public void CreateProvider_Success()
        {
            var npmPackageSearch   = new Mock <INpmPackageSearch>();
            var packageInfoFactory = new Mock <INpmPackageInfoFactory>();

            var       factory  = new JsDelivrProviderFactory(npmPackageSearch.Object, packageInfoFactory.Object);
            IProvider provider = factory.CreateProvider(_hostInteraction);

            Assert.AreSame(_hostInteraction.WorkingDirectory, provider.HostInteraction.WorkingDirectory);
            Assert.AreSame(_hostInteraction.CacheDirectory, provider.HostInteraction.CacheDirectory);
            Assert.IsFalse(string.IsNullOrEmpty(provider.Id));
        }
Пример #4
0
 public void CreateProvider_NullParameter()
 {
     var       factory  = new JsDelivrProviderFactory();
     IProvider provider = factory.CreateProvider(null);
 }