Skip to content

Commit

Permalink
fixup! feat!: rework TD @context handling
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed May 18, 2024
1 parent 418f0f3 commit 45586a4
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/core/context_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright 2024 Contributors to the Eclipse Foundation. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
// SPDX-License-Identifier: BSD-3-Clause

import "package:dart_wot/core.dart";
import "package:dart_wot/src/core/definitions/context.dart";
import "package:test/test.dart";

void main() {
group("Thing Description @context should", () {
test("not allow for an invalid first entry", () {
final illegalSingleContextEntry =
SingleContextEntry.fromString("https://example.com");

expect(
() => Context([illegalSingleContextEntry]),
throwsA(isA<ValidationException>()),
);
});
});
}

0 comments on commit 45586a4

Please sign in to comment.