blob: 722020979b9ea06fbabde07332402f90ee4f3b58 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#include "turns/domain/participant.hpp"
#include <catch2/catch_test_macros.hpp>
namespace turns::domain::tests
{
TEST_CASE("A participant")
{
auto constexpr constructed_name = "Vana Thistletop";
auto constexpr constructed_order = 17;
auto instance = participant::create(constructed_name, constructed_order);
SECTION("can be created")
{
REQUIRE(instance);
}
SECTION("the name can be read")
{
REQUIRE(instance->name() == constructed_name);
}
SECTION("the name can be changed")
{
instance->name("replaced");
REQUIRE(instance->name() == "replaced");
}
SECTION("the order can be read")
{
REQUIRE(instance->order() == constructed_order);
}
SECTION("the order can be changed")
{
instance->order(8);
REQUIRE(instance->order() == 8);
}
}
} // namespace turns::domain::tests
|