code cleanup (fixing tests but not sure why)

allow_new_sellers
Martin Brodbeck 4 years ago
parent 6000bb3ef2
commit 31a037460a
  1. 4
      src/core/article.h
  2. 2
      src/core/sale.h
  3. 2
      src/core/seller.h
  4. 1
      test/test_article.cpp
  5. 2
      test/test_sale.cpp
  6. 2
      test/test_seller.cpp

@ -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>

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

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

@ -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>

@ -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>

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

Loading…
Cancel
Save