This commit is contained in:
Tour
2025-12-03 15:40:19 +01:00
parent d3dc37576d
commit febd08821a
6 changed files with 861 additions and 47 deletions

View File

@@ -29,7 +29,7 @@ public class TroostwijkScraperTest {
// Load native OpenCV library before any tests run
try {
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
System.out.println("✓ OpenCV native library loaded successfully");
IO.println("✓ OpenCV native library loaded successfully");
} catch (UnsatisfiedLinkError e) {
System.err.println("⚠️ Warning: Could not load OpenCV native library");
System.err.println(" Tests will run without object detection support");
@@ -61,25 +61,10 @@ public class TroostwijkScraperTest {
}
// Clean up test database
File dbFile = new File(testDatabasePath);
var dbFile = new File(testDatabasePath);
if (dbFile.exists()) {
dbFile.delete();
}
}
@Test
public void testDatabaseSchema() throws SQLException {
// Verify that the database schema was created correctly
List<Lot> lots = scraper.db.getAllLots();
assertNotNull(lots, "Should be able to query lots table");
int imageCount = scraper.db.getImageCount();
assertTrue(imageCount >= 0, "Image count should be non-negative");
List<Lot> activeLots = scraper.db.getActiveLots();
assertNotNull(activeLots, "Should be able to query active lots");
System.out.println("✓ Database schema is valid and queryable");
}
}