public void Available_when_configured()
        {
            var config = new DbContextConfiguration();
            config.Initialize(
                Mock.Of<IServiceProvider>(),
                Mock.Of<IServiceProvider>(),
                new DbContextOptions(),
                Mock.Of<DbContext>(),
                DbContextConfiguration.ServiceProviderSource.Implicit);

            var source = new AtsDataStoreSource(config);

            Assert.False(source.IsAvailable);

            config.ContextOptions.AddExtension(new AtsOptionsExtension());

            Assert.True(source.IsAvailable);
        }
Beispiel #2
0
        public void Available_when_configured()
        {
            var config = new DbContextConfiguration();

            config.Initialize(
                Mock.Of <IServiceProvider>(),
                Mock.Of <IServiceProvider>(),
                new DbContextOptions(),
                Mock.Of <DbContext>(),
                DbContextConfiguration.ServiceProviderSource.Implicit);

            var source = new AtsDataStoreSource(config);

            Assert.False(source.IsAvailable);

            config.ContextOptions.AddExtension(new AtsOptionsExtension());

            Assert.True(source.IsAvailable);
        }