2018-07-09 16:40:22 +02:00
|
|
|
#define BOOST_TEST_MODULE seller
|
|
|
|
|
2018-07-09 21:42:04 +02:00
|
|
|
#include "../src/core/seller.h"
|
|
|
|
|
2018-07-11 08:33:16 +02:00
|
|
|
#include <array>
|
|
|
|
|
2018-07-09 16:54:04 +02:00
|
|
|
#include <boost/test/included/unit_test.hpp>
|
|
|
|
|
2018-07-11 08:34:23 +02:00
|
|
|
// using namespace boost::unit_test;
|
2018-07-09 16:40:22 +02:00
|
|
|
|
2018-07-11 08:34:23 +02:00
|
|
|
BOOST_AUTO_TEST_CASE(create_uuid_nil)
|
|
|
|
{
|
2018-07-09 16:40:22 +02:00
|
|
|
Seller seller{};
|
|
|
|
BOOST_TEST(seller.getUuid().is_nil() == true);
|
|
|
|
}
|
2018-07-09 17:52:46 +02:00
|
|
|
|
2018-07-11 08:34:23 +02:00
|
|
|
BOOST_AUTO_TEST_CASE(create_uuid)
|
|
|
|
{
|
2018-07-09 17:52:46 +02:00
|
|
|
Seller seller{};
|
|
|
|
seller.createUuid();
|
|
|
|
BOOST_TEST(seller.getUuid().is_nil() == false);
|
2018-07-11 08:33:16 +02:00
|
|
|
}
|
|
|
|
|
2018-07-11 08:34:23 +02:00
|
|
|
BOOST_AUTO_TEST_CASE(create_many)
|
|
|
|
{
|
2018-07-11 08:33:16 +02:00
|
|
|
constexpr unsigned int QUANTITY{10000};
|
|
|
|
std::array<Seller, QUANTITY> sellers;
|
|
|
|
for (unsigned i = 0; i < sellers.size(); i++) {
|
|
|
|
sellers[i] = Seller();
|
|
|
|
sellers[i].createUuid();
|
|
|
|
}
|
2018-07-09 17:52:46 +02:00
|
|
|
}
|