Clover Coverage Report - Liquibase Core 2.0.3-SNAPSHOT
Coverage timestamp: Sat Aug 6 2011 11:33:15 EDT
12   40   3   4
0   33   0.25   3
3     1  
1    
 
  DropViewChangeTest       Line # 10 12 0% 3 0 100% 1.0
 
  (3)
 
1    package liquibase.change.core;
2   
3    import liquibase.change.AbstractChangeTest;
4    import liquibase.database.core.MockDatabase;
5    import liquibase.statement.SqlStatement;
6    import liquibase.statement.core.DropViewStatement;
7    import static org.junit.Assert.*;
8    import org.junit.Test;
9   
 
10    public class DropViewChangeTest extends AbstractChangeTest {
11   
 
12  1 toggle @Override
13    @Test
14    public void getRefactoringName() throws Exception {
15  1 assertEquals("Drop View", new DropViewChange().getChangeMetaData().getDescription());
16    }
17   
 
18  1 toggle @Override
19    @Test
20    public void generateStatement() throws Exception {
21  1 DropViewChange change = new DropViewChange();
22  1 change.setSchemaName("SCHEMA_NAME");
23  1 change.setViewName("VIEW_NAME");
24   
25  1 SqlStatement[] sqlStatements = change.generateStatements(new MockDatabase());
26  1 assertEquals(1, sqlStatements.length);
27  1 assertTrue(sqlStatements[0] instanceof DropViewStatement);
28  1 assertEquals("SCHEMA_NAME", ((DropViewStatement) sqlStatements[0]).getSchemaName());
29  1 assertEquals("VIEW_NAME", ((DropViewStatement) sqlStatements[0]).getViewName());
30    }
31   
 
32  1 toggle @Override
33    @Test
34    public void getConfirmationMessage() throws Exception {
35  1 DropViewChange change = new DropViewChange();
36  1 change.setViewName("VIEW_NAME");
37   
38  1 assertEquals("View VIEW_NAME dropped", change.getConfirmationMessage());
39    }
40    }