Skip to content

Commit

Permalink
fixup! test: add tests for requestThingDescription method
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Dec 20, 2023
1 parent 2c9fb79 commit 5c56bec
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions test/core/discovery_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'dart:convert';

import 'package:dart_wot/dart_wot.dart';
import 'package:dart_wot/src/core/content.dart';
import 'package:dart_wot/src/core/thing_discovery.dart';
import 'package:test/test.dart';

const testUriScheme = 'test';
Expand All @@ -28,12 +29,7 @@ const validTestThingDescription = '''
}
''';

const invalidTestTitle = 'Invalid Test TD';
const invalidTestThingDescription = '''
{
"title": "$invalidTestTitle",
}
''';
const invalidTestThingDescription = '"Hi there!"';

void main() {
group('Discovery Tests', () {
Expand Down Expand Up @@ -65,7 +61,7 @@ void main() {
await expectLater(
wot.requestThingDescription(invalidTestDiscoveryUri),
// TODO: Refine error handling
throwsA(isException),
throwsA(isA<DiscoveryException>()),
);
},
);
Expand Down

0 comments on commit 5c56bec

Please sign in to comment.