Skip to content

Commit

Permalink
fixup! feat!: improve TD serialization behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Jan 3, 2024
1 parent c637808 commit 0604c4f
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions test/core/operation_type_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import "package:dart_wot/src/definitions/operation_type.dart";
import "package:test/test.dart";

void main() {
group("OperationType should", () {
test("indicate the correct default op values", () {
group("OperationType should indicate the correct default op values for", () {
test("properties", () {
const regularProperty = Property(forms: []);

final regularPropertyOpValues =
Expand Down Expand Up @@ -43,5 +43,25 @@ void main() {
OperationType.readproperty,
]);
});

test("actions", () {
const regularAction = Action(forms: []);

final regularActionOpValues =
OperationType.defaultOpValues(regularAction);
expect(regularActionOpValues, [
OperationType.invokeaction,
]);
});

test("events", () {
const regularEvent = Event(forms: []);

final regularEventOpValues = OperationType.defaultOpValues(regularEvent);
expect(regularEventOpValues, [
OperationType.subscribeevent,
OperationType.unsubscribeevent,
]);
});
});
}

0 comments on commit 0604c4f

Please sign in to comment.