This commit is contained in:
2025-11-28 14:43:58 +01:00
parent 836ce3527f
commit 7fa3e4a545
10 changed files with 664 additions and 396 deletions

View File

@@ -67,28 +67,6 @@ public class TroostwijkScraperTest {
}
}
@Test
public void testDiscoverDutchAuctions() {
// Discover auctions from the live page
List<Integer> auctions = scraper.discoverDutchAuctions();
// Verify that auctions were found
assertNotNull(auctions, "Auctions list should not be null");
assertFalse(auctions.isEmpty(), "Should find at least one Dutch auction");
// Verify that all sale IDs are positive integers
for (Integer saleId : auctions) {
assertNotNull(saleId, "Sale ID should not be null");
assertTrue(saleId > 0, "Sale ID should be positive: " + saleId);
}
// Verify no duplicate sale IDs
long uniqueCount = auctions.stream().distinct().count();
assertEquals(auctions.size(), uniqueCount, "All sale IDs should be unique");
System.out.println("✓ Found " + auctions.size() + " unique Dutch auctions");
System.out.println("✓ Sale IDs: " + auctions);
}
@Test
public void testFetchAndPersistAuctionData() throws SQLException {