mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
add testcase & remove unused code
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package com.alibaba.druid.bvt.utils;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.junit.Assert;
|
||||
|
||||
import com.alibaba.druid.util.jdbc.LocalResultSet;
|
||||
|
||||
public class LocalResultSetTest extends TestCase {
|
||||
|
||||
public void test_0() throws Exception {
|
||||
LocalResultSet rs = new LocalResultSet(null);
|
||||
rs.getRows().add(new Object[1]);
|
||||
rs.getRows().add(new Object[1]);
|
||||
Assert.assertTrue(rs.next());
|
||||
Assert.assertTrue(rs.next());
|
||||
Assert.assertFalse(rs.next());
|
||||
Assert.assertTrue(rs.previous());
|
||||
Assert.assertFalse(rs.previous());
|
||||
rs.getInt(1);
|
||||
Assert.assertTrue(rs.wasNull());
|
||||
rs.updateObject(1, 2);
|
||||
Assert.assertEquals(2, rs.getInt(1));
|
||||
Assert.assertFalse(rs.wasNull());
|
||||
rs.close();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user