enums_test.cpp 455 Bytes
Newer Older
Matteo's avatar
update  
Matteo committed
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <gtest/gtest.h>
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_generators.hpp>
#include "../src/lib/enums.h"

TEST(IrregularityType, toString) {
    EXPECT_EQ(irregularityTypeToString(IrregularityType::WOW_AND_FLUTTER), "wf");
}

TEST(IrregularityType, fromString) {
    EXPECT_EQ(irregularityTypeFromString("wf"), IrregularityType::WOW_AND_FLUTTER);
    EXPECT_THROW(irregularityTypeFromString("not_exists"), std::invalid_argument);
}