1 21 22 package org.dbunit.operation; 23 24 import org.dbunit.AbstractDatabaseTest; 25 import org.dbunit.database.MockDatabaseConnection; 26 27 32 public class CloseConnectionOperationTest extends AbstractDatabaseTest 33 { 34 public CloseConnectionOperationTest(String s) 35 { 36 super(s); 37 } 38 39 public void testMockExecute() throws Exception 40 { 41 MockDatabaseOperation operation = new MockDatabaseOperation(); 43 operation.setExpectedExecuteCalls(1); 44 45 MockDatabaseConnection connection = new MockDatabaseConnection(); 46 connection.setExpectedCloseCalls(1); 47 48 new CloseConnectionOperation(operation).execute(connection, null); 50 51 operation.verify(); 53 connection.verify(); 54 } 55 56 } 57 58 59 60 61 | Popular Tags |