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); }
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)); }
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)); }
public void CreateProvider_NullParameter() { var factory = new JsDelivrProviderFactory(); IProvider provider = factory.CreateProvider(null); }