import 'package:test/test.dart'; import 'package:db_construction_site/db_construction_site.dart'; void main() { test('check if example request succeeds', () async { final connections = await DBConstructionSite().connections.findConnections(Region.hesse); expect(connections.length, greaterThan(0)); }); test('check if invalid request fails', () async { try { await DBConstructionSite(baseUrl: 'https://noanurl.local') .connections .findConnections(Region.hesse); fail('Request succeeds although it should fail'); } catch (e) { // success } }); }