Ejemplo n.º 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));
        }
Ejemplo n.º 3
0
        public void Can_ExecuteThePackageAction()
        {
            var packageAction = new CreateDatabase(_worker.Database, _worker.SqlSyntaxProvider, _worker.TestLogger);

            packageAction.Execute("merchello", null);
        }
Ejemplo n.º 4
0
        public void Can_ExecuteThePackageAction()
        {
            var packageAction = new CreateDatabase(_database);

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