Skip to content

Commit

Permalink
fixup! test: add tests for exploreDirectory method
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Dec 22, 2023
1 parent 2872a67 commit 20f14b0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/core/discovery_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<DiscoveryException>()),
);
});

test('should be able to handle an array of invalid TDs during discovery',
() async {
final servient = Servient(
Expand Down

0 comments on commit 20f14b0

Please sign in to comment.