22 lines
No EOL
490 B
C++
22 lines
No EOL
490 B
C++
#define BOOST_TEST_MODULE article
|
|
|
|
#include "../src/core/article.h"
|
|
#include "../src/core/sale.h"
|
|
|
|
#include <boost/test/included/unit_test.hpp>
|
|
|
|
BOOST_AUTO_TEST_CASE(create_article)
|
|
{
|
|
Article article{};
|
|
BOOST_TEST(article.getUuid().is_nil() == true);
|
|
}
|
|
|
|
BOOST_AUTO_TEST_CASE(check_is_sold)
|
|
{
|
|
Article article{};
|
|
BOOST_TEST(article.isSold() == false);
|
|
|
|
auto salePtr = std::make_unique<Sale>();
|
|
salePtr->addArticle(&article);
|
|
BOOST_TEST(article.isSold() == true);
|
|
} |