public async Task GetProviderFromConfiguration_ThrowOnCreate() { var providerName = typeof(TestJournalProvider).AssemblyQualifiedName; var configuration = "Provider=" + providerName + ";" + TestJournalProvider.ThrowOnCreate + "=true"; var provider = await JournalProviderConfiguration.GetProviderFromConfiguration(configuration); provider.Create("someStream"); }
public async Task GetProviderFromConfiguration_Basic() { var providerName = typeof(TestJournalProvider).FullName + "," + typeof(TestJournalProvider).Assembly.FullName; var configuration = "Provider=" + providerName; var result = (TestJournalProvider)await JournalProviderConfiguration.GetProviderFromConfiguration(configuration); Assert.IsTrue(result.IsInitialized); Assert.IsNotNull(result.Parameters); Assert.AreEqual(result.Parameters[JournalProviderConfiguration.ProviderNameKey], providerName); }
public async Task GetProviderFromConfiguration_BadConfig() { var providerName = typeof(TestJournalProvider).AssemblyQualifiedName; var configuration = "Provider=" + providerName + ";" + TestJournalProvider.ThrowOnInitialize + "=true"; await JournalProviderConfiguration.GetProviderFromConfiguration(configuration); }
public async Task GetProviderFromConfiguration_BadProviderType() { var providerName = "SomeTypeWhichDoesNotExist"; var configuration = "Provider=" + providerName; await JournalProviderConfiguration.GetProviderFromConfiguration(configuration); }