<commit_before>package liquibase.statementexecute;

import liquibase.statement.SqlStatement;
import liquibase.statement.core.CreateDatabaseChangeLogLockTableStatement;
import liquibase.statement.core.UnlockDatabaseChangeLogStatement;
import liquibase.statement.core.MarkChangeSetRanStatement;
import liquibase.statement.core.CreateDatabaseChangeLogTableStatement;
import liquibase.database.Database;
import liquibase.database.core.CacheDatabase;
import liquibase.database.core.DB2Database;
import liquibase.database.core.DerbyDatabase;
import liquibase.database.core.FirebirdDatabase;
import liquibase.database.core.H2Database;
import liquibase.database.core.HsqlDatabase;
import liquibase.database.core.InformixDatabase;
import liquibase.database.core.MSSQLDatabase;
import liquibase.database.core.MaxDBDatabase;
import liquibase.database.core.MySQLDatabase;
import liquibase.database.core.OracleDatabase;
import liquibase.database.core.PostgresDatabase;
import liquibase.database.core.SybaseASADatabase;
import liquibase.database.core.SybaseDatabase;
import liquibase.changelog.ChangeSet;

import java.util.List;
import java.util.Arrays;

import org.junit.Test;

public class MarkChangeSetRanExecuteTest extends AbstractExecuteTest {
    @Override
    protected List<? extends SqlStatement> setupStatements(Database database) {
        return Arrays.asList(new CreateDatabaseChangeLogTableStatement());
    }

    @Test
    public void generateSql_insert() throws Exception {
        this.statementUnderTest = new MarkChangeSetRanStatement(new ChangeSet("a", "b", false, false, "c", "d", "e", "f"), false);
        String version = "2.0-b4-snp";
        assertCorrect("insert into [dbo].[databasechangelog] ([author], [comments], [dateexecuted], [description], [filename], [id], [liquibase], [md5sum], [orderexecuted]) values ('b', '', getdate(), 'empty', 'c', 'a', '" + version + "', '2:d41d8cd98f00b204e9800998ecf8427e', 1)", MSSQLDatabase.class);
        assertCorrect("insert into [databasechangelog] ([author], [comments], [dateexecuted], [description], [filename], [id], [liquibase], [md5sum], [orderexecuted]) values ('b', '', timestamp, 'empty', 'c', 'a', '" + version + "', '2:d41d8cd98f00b204e9800998ecf8427e', 1)",MaxDBDatabase.class);
        assertCorrect("insert into [databasechangelog] ([author], [comments], [dateexecuted], [description], [filename], [id], [liquibase], [md5sum], [orderexecuted]) values ('b', '', sysdate, 'empty', 'c', 'a', '" + version + "', '2:d41d8cd98f00b204e9800998ecf8427e', 1)",OracleDatabase.class, CacheDatabase.class);
        assertCorrect("insert into [databasechangelog] ([author], [comments], [dateexecuted], [description], [filename], [id], [liquibase], [md5sum], [orderexecuted]) values ('b', '', getdate(), 'empty', 'c', 'a', '" + version + "', '2:d41d8cd98f00b204e9800998ecf8427e', 1)",SybaseDatabase.class);<commit_msg>fixed test.   Still need to make it not fail on all new versions<commit_after>package liquibase.statementexecute;

import liquibase.statement.SqlStatement;
import liquibase.statement.core.CreateDatabaseChangeLogLockTableStatement;
import liquibase.statement.core.UnlockDatabaseChangeLogStatement;
import liquibase.statement.core.MarkChangeSetRanStatement;
import liquibase.statement.core.CreateDatabaseChangeLogTableStatement;
import liquibase.database.Database;
import liquibase.database.core.CacheDatabase;
import liquibase.database.core.DB2Database;
import liquibase.database.core.DerbyDatabase;
import liquibase.database.core.FirebirdDatabase;
import liquibase.database.core.H2Database;
import liquibase.database.core.HsqlDatabase;
import liquibase.database.core.InformixDatabase;
import liquibase.database.core.MSSQLDatabase;
import liquibase.database.core.MaxDBDatabase;
import liquibase.database.core.MySQLDatabase;
import liquibase.database.core.OracleDatabase;
import liquibase.database.core.PostgresDatabase;
import liquibase.database.core.SybaseASADatabase;
import liquibase.database.core.SybaseDatabase;
import liquibase.changelog.ChangeSet;

import java.util.List;
import java.util.Arrays;

import org.junit.Test;

public class MarkChangeSetRanExecuteTest extends AbstractExecuteTest {
    @Override
    protected List<? extends SqlStatement> setupStatements(Database database) {
        return Arrays.asList(new CreateDatabaseChangeLogTableStatement());
    }

    @Test
    public void generateSql_insert() throws Exception {
        this.statementUnderTest = new MarkChangeSetRanStatement(new ChangeSet("a", "b", false, false, "c", "d", "e", "f"), false);
        String version = "2.0-b5-snp";
        assertCorrect("insert into [dbo].[databasechangelog] ([author], [comments], [dateexecuted], [description], [filename], [id], [liquibase], [md5sum], [orderexecuted]) values ('b', '', getdate(), 'empty', 'c', 'a', '" + version + "', '2:d41d8cd98f00b204e9800998ecf8427e', 1)", MSSQLDatabase.class);
        assertCorrect("insert into [databasechangelog] ([author], [comments], [dateexecuted], [description], [filename], [id], [liquibase], [md5sum], [orderexecuted]) values ('b', '', timestamp, 'empty', 'c', 'a', '" + version + "', '2:d41d8cd98f00b204e9800998ecf8427e', 1)",MaxDBDatabase.class);
        assertCorrect("insert into [databasechangelog] ([author], [comments], [dateexecuted], [description], [filename], [id], [liquibase], [md5sum], [orderexecuted]) values ('b', '', sysdate, 'empty', 'c', 'a', '" + version + "', '2:d41d8cd98f00b204e9800998ecf8427e', 1)",OracleDatabase.class, CacheDatabase.class);
        assertCorrect("insert into [databasechangelog] ([author], [comments], [dateexecuted], [description], [filename], [id], [liquibase], [md5sum], [orderexecuted]) values ('b', '', getdate(), 'empty', 'c', 'a', '" + version + "', '2:d41d8cd98f00b204e9800998ecf8427e', 1)",SybaseDatabase.class);
{'fraction_non_alphanumeric': 0.14531977245302535, 'fraction_numerical': 0.03482158248577832, 'mean_word_length': 6.96978021978022, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4745730', 'n_tokens_mistral': 1941, 'n_tokens_neox': 1770, 'n_words': 355}