code cleanup
This commit is contained in:
parent
74719b762f
commit
6000bb3ef2
17 changed files with 65 additions and 67 deletions
|
@ -30,10 +30,11 @@ BOOST_AUTO_TEST_CASE(create_many)
|
|||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(with_article) {
|
||||
Seller seller("Max", "Mustermann");
|
||||
auto article = std::make_shared<Article>();
|
||||
Seller seller{};
|
||||
auto article = std::make_unique<Article>();
|
||||
article->setDescription("Test article");
|
||||
seller.addArticle(article);
|
||||
seller.addArticle(std::move(article));
|
||||
BOOST_TEST((article == nullptr));
|
||||
BOOST_TEST(seller.getArticles(false).at(0)->getDescription() == "Test article");
|
||||
BOOST_TEST(seller.numArticlesSold() == 0);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue