code cleanup

This commit is contained in:
Martin Brodbeck 2018-07-20 11:52:26 +02:00
parent 74719b762f
commit 6000bb3ef2
17 changed files with 65 additions and 67 deletions

View file

@ -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);
}