summaryrefslogtreecommitdiff
path: root/app/tests/widgets/participant_row.cpp
blob: 0e91ad7f43ba1464593d45521ee2ba1e37ca97f3 (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
#include "turns/app/widgets/participant_row.hpp"

#include "turns/domain/participant.hpp"
#include "turns/lang/messages.hpp"

#include <catch2/catch_test_macros.hpp>
#include <catch2/generators/catch_generators.hpp>

#include <algorithm>
#include <string>

#include <gtkmm/widget.h>

namespace turns::app::widgets::tests
{

  TEST_CASE("A freshly constructed participant row")
  {
    SECTION("can be created without a participant")
    {
      REQUIRE(Gtk::make_managed<participant_row>(Glib::RefPtr<domain::participant>{}));
    }

    SECTION("can be created with a participant")
    {
      REQUIRE(Gtk::make_managed<participant_row>(domain::participant::create("Tazmyla Fireforge", 13)));
    }
  }

}  // namespace turns::app::widgets::tests