public void CertificateStores_WithEmptyConfigurationSection_DefaultsToSingleStoreMy() { var configFake = new KuduConfigurationSectionFake(); var storesFake = new CertificateStoresConfigurationElementCollectionFake(); configFake.SetFake("certificateStores", storesFake); IKuduConfiguration config = CreateConfiguration(configFake, new NameValueCollection()); Assert.Equal(StoreName.My, config.CertificateStores.Single().Name); }
public void CertificateStores_WithSingleElement_ConstainsSingleItem() { var configFake = new KuduConfigurationSectionFake(); var storesFake = new CertificateStoresConfigurationElementCollectionFake(); storesFake.Add(new CertificateStoreConfigurationElementFake() .SetFake("name", StoreName.Root)); configFake.SetFake("certificateStores", storesFake); IKuduConfiguration config = CreateConfiguration(configFake, new NameValueCollection()); Assert.Equal(StoreName.Root, config.CertificateStores.Single().Name); }