Website Summary Files Commits Branches @commit @diff @stats
path: root / tests / Test_DateTime.cpp
diff options
context:
space:
mode:
Commitd6eb1cfde134235cd4826e4788be6de1a3d4bae2 (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-01 11:09:30 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-01 11:09:30 +0300
Filesb071b46a8509c7a179c2ae4502a2aef5a8d883cb /tests/Test_DateTime.cpp
FMI-OOP-P1_TicketSystem-d6eb1cfde134235cd4826e4788be6de1a3d4bae2.tar
FMI-OOP-P1_TicketSystem-d6eb1cfde134235cd4826e4788be6de1a3d4bae2.tar.gz
FMI-OOP-P1_TicketSystem-d6eb1cfde134235cd4826e4788be6de1a3d4bae2.zip
Parentb0693708cdf2c75d7071f117006dbf2b7a1bd81a (diff)
Autocommit at 01.05.2022 @ 11:09
1 files changed, 14 insertions, 1 deletions
-rw-r--r--tests/Test_DateTime.cpp15
diff --git a/tests/Test_DateTime.cpp b/tests/Test_DateTime.cpp
index efffb4e..189e988 100644
--- a/tests/Test_DateTime.cpp
+++ b/tests/Test_DateTime.cpp
@@ -1,5 +1,18 @@
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "../doctest/doctest/doctest.h"
-
#include "../src/DateTime/DateTime.h"
+TEST_SUITE_BEGIN("ClassDateTime");
+
+TEST_SUITE("Constructors") {
+ TEST_CASE("Ctor_SavesValues_WhenGivenCorrectOnes") {
+ DateTime dt(2, 49, 4, 12, 2022);
+ CHECK_EQ(dt.get_hour(), 2);
+ CHECK_EQ(dt.get_minute(), 49);
+ CHECK_EQ(dt.get_day(), 4);
+ CHECK_EQ(dt.get_month(), 12);
+ CHECK_EQ(dt.get_year(), 2022);
+ }
+}
+
+TEST_SUITE_END();