new test cases for article
This commit is contained in:
parent
94edacc6e6
commit
c1c7e32291
2 changed files with 25 additions and 0 deletions
21
test/test_article.cpp
Normal file
21
test/test_article.cpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
#define BOOST_TEST_MODULE article
|
||||
|
||||
#include "../src/core/article.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_shared<Sale>();
|
||||
article.setSale(salePtr);
|
||||
BOOST_TEST(article.isSold() == true);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue