From 84fb875123201f28a3333285b6323037b08accb4 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 16 May 2025 11:12:43 +0200 Subject: lib: implement ListModel interface for TurnOrder --- lib/tests/turnsmm/turn-order.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'lib/tests/turnsmm') diff --git a/lib/tests/turnsmm/turn-order.cpp b/lib/tests/turnsmm/turn-order.cpp index ad8306b..ed9d586 100644 --- a/lib/tests/turnsmm/turn-order.cpp +++ b/lib/tests/turnsmm/turn-order.cpp @@ -1,5 +1,7 @@ #include "turnsmm/turn-order.hpp" +#include "turnsmm/participant.hpp" + #include #include @@ -21,5 +23,21 @@ SCENARIO("Creating a turn order", "[lib][object][lifetime]") REQUIRE_FALSE(instance.get_running()); REQUIRE_FALSE(instance.get_property("running")); } + + THEN("it's item count is 0") + { + REQUIRE(instance.get_n_items() == 0); + } + + THEN("it's item type is Turns.Participant") + { + REQUIRE(instance.get_item_type() == Turns::Participant::get_type()); + } + + THEN("it's first item is NULL") + { + REQUIRE(instance.get_object(0) == nullptr); + REQUIRE(instance.get_typed_object(0) == nullptr); + } } } \ No newline at end of file -- cgit v1.2.3