コード例 #1
0
        internal async Task AssertAll(string expected = null)
        {
            var nodes = (await _connection.QueryAsync <Node>($"SELECT * FROM {SqlStuff.Escape(Table)}")).ToDictionary(x => x.Id, x => x);

            await DropTable().ExecuteAsync(_connection);

            var asserter = new Asserter(nodes, expected ?? _expected);

            asserter.AssertAll();
        }
コード例 #2
0
        protected async Task <LRTest> Test(string tree)
        {
            var tableName = CreateTableName();
            await CreateTable.New("[%_Node_%]", SqlStuff.Escape(tableName)).ExecuteAsync(_connection);

            await Arrange(tree, SqlStuff.Escape(tableName), _connection);

            await MigrationFactory.CreateScript(tableName, "Id", "Parent_Id").ExecuteAsync(_connection);

            return(new LRTest(tableName, tree, _connection));
        }
コード例 #3
0
 private Script DropTable()
 {
     return(TestsBase.DropTable.New("[Node]", SqlStuff.Escape(Table)));
 }