kima2/test/test_seller.cpp
2018-07-11 08:34:23 +02:00

32 lines
No EOL
666 B
C++

#define BOOST_TEST_MODULE seller
#include "../src/core/seller.h"
#include <array>
#include <boost/test/included/unit_test.hpp>
// using namespace boost::unit_test;
BOOST_AUTO_TEST_CASE(create_uuid_nil)
{
Seller seller{};
BOOST_TEST(seller.getUuid().is_nil() == true);
}
BOOST_AUTO_TEST_CASE(create_uuid)
{
Seller seller{};
seller.createUuid();
BOOST_TEST(seller.getUuid().is_nil() == false);
}
BOOST_AUTO_TEST_CASE(create_many)
{
constexpr unsigned int QUANTITY{10000};
std::array<Seller, QUANTITY> sellers;
for (unsigned i = 0; i < sellers.size(); i++) {
sellers[i] = Seller();
sellers[i].createUuid();
}
}