View Javadoc

1   package liquibase.change.core;
2   
3   import liquibase.change.AbstractChangeTest;
4   import static org.junit.Assert.*;
5   import org.junit.Before;
6   import org.junit.Test;
7   
8   /**
9    * Tests for {@link RawSQLChange}
10   */
11  public abstract class RawSQLChangeTest extends AbstractChangeTest {
12  
13      private RawSQLChange refactoring;
14  
15      @Before
16      public void setUp() throws Exception {
17          refactoring = new RawSQLChange();
18      }
19  
20      @Override
21      @Test
22      public void getRefactoringName() throws Exception {
23          assertEquals("Custom SQL", new RawSQLChange().getChangeMetaData().getDescription());
24      }
25  
26  //    @Test
27  //    public void generateStatement() throws Exception {
28  //        refactoring.setSql("SQL STATEMENT HERE");
29  //        OracleDatabase database = new OracleDatabase();
30  //        assertEquals("SQL STATEMENT HERE", refactoring.generateStatements(database)[0].getSqlStatement(database));
31  //    }
32  
33      @Override
34      @Test
35      public void getConfirmationMessage() throws Exception {
36          assertEquals("Custom SQL executed", refactoring.getConfirmationMessage());
37      }
38  }