Exemplo n.º 1
0
        public void Create_Database_Schema()
        {
            this.sessionFactoryBuilder = MockRepository.GenerateMock<ISessionFactoryBuilder>();
            this.sessionFactoryBuilder.Expect(b => b.CreateSessionFactory(Arg<Schema>.Is.Equal(Schema.Rebuild))).Return(this.sessionFactory);

            var database = new DatabaseAccessLayer(this.sessionFactoryBuilder);

            database.Initalize(Schema.Rebuild);

            this.sessionFactoryBuilder.VerifyAllExpectations();
        }