コード例 #1
0
        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");
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 public async Task GetProviderFromConfiguration_BadConfig()
 {
     var providerName  = typeof(TestJournalProvider).AssemblyQualifiedName;
     var configuration = "Provider=" + providerName + ";" + TestJournalProvider.ThrowOnInitialize + "=true";
     await JournalProviderConfiguration.GetProviderFromConfiguration(configuration);
 }
コード例 #4
0
 public async Task GetProviderFromConfiguration_BadProviderType()
 {
     var providerName  = "SomeTypeWhichDoesNotExist";
     var configuration = "Provider=" + providerName;
     await JournalProviderConfiguration.GetProviderFromConfiguration(configuration);
 }