diff --git a/test/core/discovery_test.dart b/test/core/discovery_test.dart index 98286c5b..49d962e6 100644 --- a/test/core/discovery_test.dart +++ b/test/core/discovery_test.dart @@ -301,6 +301,21 @@ void main() { expect(thingDiscoveryProcess.done, true); }); + test('should reject invalid TDD Thing Descriptions', () async { + final servient = Servient( + clientFactories: [ + _MockedProtocolClientFactory(), + ], + ); + + final wot = await servient.start(); + + expect( + () async => await wot.exploreDirectory(validTestDiscoveryUri), + throwsA(isA()), + ); + }); + test('should be able to handle an array of invalid TDs during discovery', () async { final servient = Servient(