diff --git a/test/core/context_test.dart b/test/core/context_test.dart new file mode 100644 index 00000000..19301e83 --- /dev/null +++ b/test/core/context_test.dart @@ -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()), + ); + }); + }); +}