Compare commits
4 commits
39ab4b180e
...
1cee27ca70
Author | SHA1 | Date | |
---|---|---|---|
1cee27ca70 | |||
0a76e5933d | |||
f7bd7d614a | |||
6a075f2402 |
5 changed files with 15 additions and 5 deletions
5
.vscode/.cmaketools.json
vendored
Normal file
5
.vscode/.cmaketools.json
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"variant": null,
|
||||||
|
"activeEnvironments": [],
|
||||||
|
"codeModel": null
|
||||||
|
}
|
|
@ -5,7 +5,7 @@
|
||||||
#include <boost/uuid/uuid_generators.hpp>
|
#include <boost/uuid/uuid_generators.hpp>
|
||||||
#include <boost/uuid/uuid_io.hpp>
|
#include <boost/uuid/uuid_io.hpp>
|
||||||
|
|
||||||
Entity::Entity() {}
|
//Entity::Entity() {}
|
||||||
|
|
||||||
void Entity::createUuid()
|
void Entity::createUuid()
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
class Entity
|
class Entity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Entity();
|
//Entity();
|
||||||
virtual ~Entity() = 0;
|
//ivirtual ~Entity() = 0;
|
||||||
const boost::uuids::uuid& getUuid() const { return uuid; };
|
const boost::uuids::uuid& getUuid() const { return uuid; };
|
||||||
void createUuid();
|
void createUuid();
|
||||||
void createUuidFromString(const std::string& uuidString);
|
void createUuidFromString(const std::string& uuidString);
|
||||||
|
|
|
@ -6,4 +6,3 @@ set(TEST_SOURCES test_seller.cpp)
|
||||||
|
|
||||||
add_executable(testsuite ${TEST_SOURCES})
|
add_executable(testsuite ${TEST_SOURCES})
|
||||||
target_link_libraries(testsuite core Boost::boost Boost::filesystem Boost::unit_test_framework)
|
target_link_libraries(testsuite core Boost::boost Boost::filesystem Boost::unit_test_framework)
|
||||||
#target_link_libraries(testsuite core)
|
|
|
@ -6,7 +6,13 @@
|
||||||
|
|
||||||
using namespace boost::unit_test;
|
using namespace boost::unit_test;
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE( initial_test ) {
|
BOOST_AUTO_TEST_CASE( create_uuid_nil ) {
|
||||||
Seller seller{};
|
Seller seller{};
|
||||||
BOOST_TEST(seller.getUuid().is_nil() == true);
|
BOOST_TEST(seller.getUuid().is_nil() == true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(create_uuid) {
|
||||||
|
Seller seller{};
|
||||||
|
seller.createUuid();
|
||||||
|
BOOST_TEST(seller.getUuid().is_nil() == false);
|
||||||
|
}
|
Loading…
Reference in a new issue