Пример #1
0
        private void createDatabaseButton_Click(object sender, EventArgs e)
        {
            var ops = new CreateDatabase(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "database1.accdb"));

            if (ops.Execute())
            {
                MessageBox.Show("Done");
            }
            else
            {
                MessageBox.Show("Failed");
            }
        }
        public void CreateDatabase_DatabaseDoenstExist_CreateDatabase()
        {
            IDatabaseContainer databaseContainer = ObjectConstructor.CreateDatabaseContainer();
            string             databaseName      = VariousFunctions.GenerateRandomString(8);

            while (databaseContainer.ExistDatabase(databaseName))
            {
                databaseName = VariousFunctions.GenerateRandomString(8);
            }
            CreateDatabase createDatabase = CreateCreateDatabase(databaseContainer, databaseName);

            Assert.IsTrue(createDatabase.ValidateParameters());
            createDatabase.Execute();
            Assert.IsTrue(databaseContainer.ExistDatabase(databaseName));
        }
Пример #3
0
        public void Can_ExecuteThePackageAction()
        {
            var packageAction = new CreateDatabase(_worker.Database, _worker.SqlSyntaxProvider, _worker.TestLogger);

            packageAction.Execute("merchello", null);
        }
Пример #4
0
        public void Can_ExecuteThePackageAction()
        {
            var packageAction = new CreateDatabase(_database);

            packageAction.Execute("merchello", null);
        }