summaryrefslogtreecommitdiff
path: root/domain/tests/participant.cpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2024-07-23 15:08:19 +0200
committerFelix Morgner <felix.morgner@gmail.com>2024-07-23 15:08:19 +0200
commit4ec6a2ae12b6adb843c0777649ff45a741ca6cbc (patch)
tree93dc2ba99dbcb42b2af73f0a3c4cd4f0c0f091c4 /domain/tests/participant.cpp
parent5f4249a37ce816b8deceb299bc841190fbb15983 (diff)
downloadturns-4ec6a2ae12b6adb843c0777649ff45a741ca6cbc.tar.xz
turns-4ec6a2ae12b6adb843c0777649ff45a741ca6cbc.zip
domain: redesign turn_order
Diffstat (limited to 'domain/tests/participant.cpp')
-rw-r--r--domain/tests/participant.cpp90
1 files changed, 15 insertions, 75 deletions
diff --git a/domain/tests/participant.cpp b/domain/tests/participant.cpp
index dd244f4..e4e185c 100644
--- a/domain/tests/participant.cpp
+++ b/domain/tests/participant.cpp
@@ -22,123 +22,63 @@ namespace turns::domain::tests
REQUIRE(participant::create(constructed_name, constructed_priority, constructed_disposition));
}
- SECTION("allows access to its disposition via the associated accessors")
+ SECTION("allows access to its disposition")
{
SECTION("allowing to get it")
{
- REQUIRE(instance.get_disposition() == constructed_disposition);
+ REQUIRE(instance.disposition() == constructed_disposition);
}
SECTION("allowing to get it via a constant object")
{
auto const & cref = instance;
- REQUIRE(cref.get_disposition() == constructed_disposition);
+ REQUIRE(cref.disposition() == constructed_disposition);
}
SECTION("allowing to set it")
{
- instance.set_disposition(disposition::hostile);
- REQUIRE(instance.get_disposition() == disposition::hostile);
+ instance.disposition() = disposition::hostile;
+ REQUIRE(instance.disposition() == disposition::hostile);
}
}
- SECTION("allows access to its disposition via the associated property")
+ SECTION("allows access to its name")
{
SECTION("allowing to get it")
{
- REQUIRE(instance.property_disposition() == constructed_disposition);
+ REQUIRE(instance.name() == constructed_name);
}
SECTION("allowing to get it via a constant object")
{
auto const & cref = instance;
- REQUIRE(cref.property_disposition() == constructed_disposition);
+ REQUIRE(cref.name() == constructed_name);
}
SECTION("allowing to set it")
{
- instance.property_disposition() = disposition::hostile;
- REQUIRE(instance.get_disposition() == disposition::hostile);
+ instance.name() = "replaced";
+ REQUIRE(instance.name() == "replaced");
}
}
- SECTION("allows access to its name via the associated accessors")
+ SECTION("allows access to its priority")
{
SECTION("allowing to get it")
{
- REQUIRE(instance.get_name() == constructed_name);
+ REQUIRE(instance.priority() == constructed_priority);
}
SECTION("allowing to get it via a constant object")
{
auto const & cref = instance;
- REQUIRE(cref.get_name() == constructed_name);
+ REQUIRE(cref.priority() == constructed_priority);
}
SECTION("allowing to set it")
{
- instance.set_name("replaced");
- REQUIRE(instance.get_name() == "replaced");
- }
- }
-
- SECTION("allows access to its name via the associated property")
- {
- SECTION("allowing to get it")
- {
- REQUIRE(instance.property_name() == constructed_name);
- }
-
- SECTION("allowing to get it via a constant object")
- {
- auto const & cref = instance;
- REQUIRE(cref.property_name() == constructed_name);
- }
-
- SECTION("allowing to set it")
- {
- instance.property_name() = "replaced";
- REQUIRE(instance.get_name() == "replaced");
- }
- }
-
- SECTION("allows access to its priority via the associated accessors")
- {
- SECTION("allowing to get it")
- {
- REQUIRE(instance.get_priority() == constructed_priority);
- }
-
- SECTION("allowing to get it via a constant object")
- {
- auto const & cref = instance;
- REQUIRE(cref.get_priority() == constructed_priority);
- }
-
- SECTION("allowing to set it")
- {
- instance.set_priority(3);
- REQUIRE(instance.get_priority() == 3);
- }
- }
-
- SECTION("allows access to its priority via the associated property")
- {
- SECTION("allowing to get it")
- {
- REQUIRE(instance.property_priority() == constructed_priority);
- }
-
- SECTION("allowing to get it via a constant object")
- {
- auto const & cref = instance;
- REQUIRE(cref.property_priority() == constructed_priority);
- }
-
- SECTION("allowing to set it")
- {
- instance.property_priority() = 4;
- REQUIRE(instance.get_priority() == 4);
+ instance.priority() = 4;
+ REQUIRE(instance.priority() == 4);
}
}