public void ParsingCertificateStoreShouldWork() { var az = new Mock <IAzureHelper>(); var factory = new Mock <IStorageFactory>(); var log = new Mock <ILoggerFactory>(); var kvFactory = new Mock <IKeyVaultFactory>(); var client = new Mock <CertificateClient>(); kvFactory.Setup(x => x.CreateCertificateClient("example")) .Returns(client.Object); IRenewalOptionParser parser = new RenewalOptionParser( az.Object, kvFactory.Object, factory.Object, new Mock <IAzureAppServiceClient>().Object, new Mock <IAzureCdnClient>().Object, log.Object); var cfg = TestHelper.LoadConfig("config"); var store = parser.ParseCertificateStore(cfg.Certificates[0]); store.Type.Should().Be("keyVault"); store.Name.Should().Be("example"); }
public void ParsingCertificateStoreShouldWork() { var az = new Mock <IAzureHelper>(); var kv = new Mock <IKeyVaultClient>(); var factory = new Mock <IStorageFactory>(); var log = new Mock <ILogger>(); IRenewalOptionParser parser = new RenewalOptionParser(az.Object, kv.Object, factory.Object, log.Object); var cfg = TestHelper.LoadConfig("config"); var store = parser.ParseCertificateStore(cfg.Certificates[0]); store.Type.Should().Be("keyVault"); store.Name.Should().Be("example"); }