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(); }
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)); }
private Script DropTable() { return(TestsBase.DropTable.New("[Node]", SqlStuff.Escape(Table))); }