code cleanup (fixing tests but not sure why)

This commit is contained in:
Martin Brodbeck 2018-07-20 13:07:48 +02:00
parent 6000bb3ef2
commit 31a037460a
6 changed files with 8 additions and 5 deletions

View file

@ -2,8 +2,8 @@
#define ARTICLE_H
#include "entity.h"
#include "sale.h"
#include "seller.h"
//#include "sale.h"
//#include "seller.h"
#include <memory>
#include <string>

View file

@ -7,7 +7,7 @@
#include "boost/date_time/posix_time/posix_time.hpp"
class Article;
//class Article;
using ArticlesVec = std::vector<Article*>;

View file

@ -8,7 +8,7 @@
#include <string>
#include <vector>
class Article;
//class Article;
class Seller : public Entity
{

View file

@ -1,6 +1,7 @@
#define BOOST_TEST_MODULE article
#include "../src/core/article.h"
#include "../src/core/sale.h"
#include <boost/test/included/unit_test.hpp>

View file

@ -1,6 +1,8 @@
#define BOOST_TEST_MODULE sale
#include "../src/core/sale.h"
#include "../src/core/seller.h"
#include "../src/core/article.h"
#include <vector>

View file

@ -30,7 +30,7 @@ BOOST_AUTO_TEST_CASE(create_many)
}
BOOST_AUTO_TEST_CASE(with_article) {
Seller seller{};
Seller seller{"Max", "Mustermann"};
auto article = std::make_unique<Article>();
article->setDescription("Test article");
seller.addArticle(std::move(article));