Esempio n. 1
0
        public void CanInitClr()
        {
            new InitDatabaseTask {
                Database = "DbInitTest"
            }.Execute();
            new InitMetaTableTask {
                Database = "DbInitTest"
            }.Execute();
            var task = new InitClrTask {
                Database = "DbInitTest"
            };

            task.Execute();
            if (null != task.Error)
            {
                Console.WriteLine(task.Error.ToString());
            }
            Assert.AreEqual(TaskState.Success, task.State);
        }
Esempio n. 2
0
        public void WillNotInitClrTwice()
        {
            new InitDatabaseTask {
                Database = "DbInitTest"
            }.Execute();
            new InitMetaTableTask {
                Database = "DbInitTest"
            }.Execute();
            var task = new InitClrTask {
                Database = "DbInitTest"
            };

            task.Execute();
            Assert.AreEqual(TaskState.Success, task.State);
            task = new InitClrTask {
                Database = "DbInitTest"
            };
            task.Execute();
            Assert.AreEqual(TaskState.SuccessOnce, task.State);
        }