Search in sources :

Example 6 with TestRowSetListener

use of util.TestRowSetListener in project jdk8u_jdk by JetBrains.

the class BaseRowSetTests method baseRowSetTest0004.

/*
     * Create multiple RowSetListeners and validate that notifyRowChanged
     * is called on all listeners
     */
@Test(dataProvider = "rowSetType")
public void baseRowSetTest0004(StubBaseRowSet rs) throws Exception {
    TestRowSetListener rsl = new TestRowSetListener();
    TestRowSetListener rsl2 = new TestRowSetListener();
    rs.addRowSetListener(rsl);
    rs.addRowSetListener(rsl2);
    rs.notifyRowChanged();
    assertTrue(rsl.isNotified(TestRowSetListener.ROW_CHANGED));
    assertTrue(rsl2.isNotified(TestRowSetListener.ROW_CHANGED));
}
Also used : TestRowSetListener(util.TestRowSetListener) Test(org.testng.annotations.Test)

Example 7 with TestRowSetListener

use of util.TestRowSetListener in project jdk8u_jdk by JetBrains.

the class BaseRowSetTests method baseRowSetTest0002.

/*
     * Create a RowSetListener and validate that notifyRowSetChanged is called
     */
@Test(dataProvider = "rowSetType")
public void baseRowSetTest0002(StubBaseRowSet rs) throws Exception {
    TestRowSetListener rsl = new TestRowSetListener();
    rs.addRowSetListener(rsl);
    rs.notifyRowSetChanged();
    assertTrue(rsl.isNotified(TestRowSetListener.ROWSET_CHANGED));
}
Also used : TestRowSetListener(util.TestRowSetListener) Test(org.testng.annotations.Test)

Example 8 with TestRowSetListener

use of util.TestRowSetListener in project jdk8u_jdk by JetBrains.

the class BaseRowSetTests method baseRowSetTest0001.

/*
     * Create a RowSetListener and validate that notifyRowChanged is called
     */
@Test(dataProvider = "rowSetType")
public void baseRowSetTest0001(StubBaseRowSet rs) throws Exception {
    TestRowSetListener rsl = new TestRowSetListener();
    rs.addRowSetListener(rsl);
    rs.notifyRowChanged();
    assertTrue(rsl.isNotified(TestRowSetListener.ROW_CHANGED));
}
Also used : TestRowSetListener(util.TestRowSetListener) Test(org.testng.annotations.Test)

Example 9 with TestRowSetListener

use of util.TestRowSetListener in project jdk8u_jdk by JetBrains.

the class BaseRowSetTests method baseRowSetTest0003.

/*
     * Create multiple RowSetListeners and validate that notifyRowSetChanged
     * is called on all listeners
     */
@Test(dataProvider = "rowSetType")
public void baseRowSetTest0003(StubBaseRowSet rs) throws Exception {
    TestRowSetListener rsl = new TestRowSetListener();
    TestRowSetListener rsl2 = new TestRowSetListener();
    rs.addRowSetListener(rsl);
    rs.addRowSetListener(rsl2);
    rs.notifyRowSetChanged();
    assertTrue(rsl.isNotified(TestRowSetListener.ROWSET_CHANGED));
    assertTrue(rsl2.isNotified(TestRowSetListener.ROWSET_CHANGED));
}
Also used : TestRowSetListener(util.TestRowSetListener) Test(org.testng.annotations.Test)

Example 10 with TestRowSetListener

use of util.TestRowSetListener in project jdk8u_jdk by JetBrains.

the class BaseRowSetTests method baseRowSetTest0007.

/*
     * Create multiple RowSetListeners and validate that notifyRowSetChanged,
     * notifyRowChanged() and notifyCursorMoved are called on all listeners
     */
@Test(dataProvider = "rowSetType")
public void baseRowSetTest0007(StubBaseRowSet rs) throws Exception {
    TestRowSetListener rsl = new TestRowSetListener();
    TestRowSetListener rsl2 = new TestRowSetListener();
    rs.addRowSetListener(rsl);
    rs.addRowSetListener(rsl2);
    rs.notifyRowSetChanged();
    rs.notifyRowChanged();
    rs.notifyCursorMoved();
    assertTrue(rsl.isNotified(TestRowSetListener.CURSOR_MOVED | TestRowSetListener.ROWSET_CHANGED | TestRowSetListener.ROW_CHANGED));
    assertTrue(rsl2.isNotified(TestRowSetListener.CURSOR_MOVED | TestRowSetListener.ROWSET_CHANGED | TestRowSetListener.ROW_CHANGED));
}
Also used : TestRowSetListener(util.TestRowSetListener) Test(org.testng.annotations.Test)

Aggregations

Test (org.testng.annotations.Test)18 TestRowSetListener (util.TestRowSetListener)18 CachedRowSet (javax.sql.rowset.CachedRowSet)3