Revision 46505 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial/org.gvsig.h2spatial.h2gis132/org.gvsig.h2spatial.h2gis132.provider/src/test/java/org/gvsig/fmap/dal/store/h2/STAsBinaryTest.java

View differences:

STAsBinaryTest.java
124 124
    }
125 125

  
126 126
    public void testIterateOverTableWithNullGeoms() throws Exception {
127
        DataManager dataManager = DALLocator.getDataManager();
127
        try {
128
            DataManager dataManager = DALLocator.getDataManager();
128 129

  
129
        JDBCServerExplorer explorer = TestUtils.openServerExplorer(DBNAME);
130
        createTableWithNullGeoms(explorer, TABLE_WITH_NULL_GEOMS);
131
        
132
        JDBCStoreParameters params = explorer.getOpenParameters();
133
        params.setTable(TABLE_WITH_NULL_GEOMS);
134
        FeatureStore store = (FeatureStore) dataManager.openStore(TestUtils.PROVIDER_NAME, params);
135
        FeatureSet set = store.getFeatureSet();
136
        int sz = (int) set.getSize();
137
//        System.out.println("#### count: "+sz);
138
        for (Feature f : set ) {
139
//            System.out.println("#### feature: "+f.toString());
140
            if( !f.getBoolean("ISNULL") ) {
141
                assertNotNull(f.getGeometry("GEOM"));
130
            JDBCServerExplorer explorer = TestUtils.openServerExplorer(DBNAME);
131
            createTableWithNullGeoms(explorer, TABLE_WITH_NULL_GEOMS);
132

  
133
            JDBCStoreParameters params = explorer.getOpenParameters();
134
            params.setTable(TABLE_WITH_NULL_GEOMS);
135
            FeatureStore store = (FeatureStore) dataManager.openStore(TestUtils.PROVIDER_NAME, params);
136
            FeatureSet set = store.getFeatureSet();
137
            int sz = (int) set.getSize();
138
    //        System.out.println("#### count: "+sz);
139
            for (Feature f : set ) {
140
    //            System.out.println("#### feature: "+f.toString());
141
                if( !f.getBoolean("ISNULL") ) {
142
                    assertNotNull(f.getGeometry("GEOM"));
143
                }
142 144
            }
145
            assertEquals(4, sz);
146
        } catch (Exception ex) {
147
            ex.printStackTrace();
148
            throw ex;
143 149
        }
144
        assertEquals(4, sz);
145 150
    }
146 151
}

Also available in: Unified diff