Example #1
0
            public void SetUp()
            {
                Configurator = new AntlerConfigurator();
                Configurator.UseBuiltInContainer().UseStorage(NHibernateStorage.Use.WithDatabaseConfiguration(SQLiteConfiguration.Standard.InMemory()).WithMappings(From.AssemblyWithType <CountryMap>().First())).
                UseStorage(EntityFrameworkPlusSqlCe.Use.WithConnectionString("Data Source=TestDB.sdf").WithMappings(From.AssemblyWithType <Antler.Specs.Shared.EntityFramework.Mappings.CountryMap>().First()).WithRecreatedDatabase(true), "Second");

                nhSession = NewSessionForTesting.CreateNHibernateSession(Configurator, typeof(NHibernateStorage), UnitOfWorkSettings.Default.StorageName);
            }
Example #2
0
            public void should_not_fail()
            {
                //act
                var configurator = new AntlerConfigurator();

                configurator.UseBuiltInContainer()
                .UseStorage(MongoDbStorage.Use("mongodb://localhost:27017", "AntlerTest")
                            .WithRecreatedDatabase(true));
            }
Example #3
0
            public void SetUp()
            {
                Configurator = new AntlerConfigurator();
                Configurator.UseBuiltInContainer().UseStorage(NHibernateStorage.Use.WithDatabaseConfiguration(SQLiteConfiguration.Standard.InMemory()).WithMappings(From.AssemblyWithType <CountryMap>().First())).
                UseStorage(NHibernateStorage.Use.WithDatabaseConfiguration(SQLiteConfiguration.Standard.InMemory()).WithMappings(From.AssemblyWithType <CountryMap>().First()), "Second");

                nhSessionFirst  = NewSessionForTesting.CreateNHibernateSession(Configurator, typeof(NHibernateStorage), UnitOfWorkSettings.Default.StorageName);
                nhSessionSecond = NewSessionForTesting.CreateNHibernateSession(Configurator, typeof(NHibernateStorage), "Second");
            }
Example #4
0
            public void should_throw_exception()
            {
                //arrange
                var configurator = new AntlerConfigurator();

                //act
                configurator.UseBuiltInContainer()
                .UseStorage(
                    NHibernateStorage.Use.WithDatabaseConfiguration(SQLiteConfiguration.Standard.InMemory())
                    .WithMappings(From.AssemblyWithType <CountryMap>().First()), "Super")
                .
                UseStorage(
                    NHibernateStorage.Use.WithDatabaseConfiguration(SQLiteConfiguration.Standard.InMemory())
                    .WithMappings(From.AssemblyWithType <CountryMap>().First()), "Super");
            }