flags changed
This commit is contained in:
parent
7c40ea6f97
commit
70ce0ceb19
3 changed files with 3 additions and 3 deletions
|
@ -184,7 +184,7 @@ unsigned int Database::storeSellers(std::vector<Seller>& sellers)
|
||||||
sqlite3_finalize(stmt);
|
sqlite3_finalize(stmt);
|
||||||
throw std::runtime_error(errMsg);
|
throw std::runtime_error(errMsg);
|
||||||
}
|
}
|
||||||
seller.setState(Seller::State::CLEAN);
|
seller.setState(Seller::State::OK);
|
||||||
++count;
|
++count;
|
||||||
sqlite3_finalize(stmt);
|
sqlite3_finalize(stmt);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
class Entity
|
class Entity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum class State { NEW, UPDATED, CLEAN };
|
enum class State { NEW, UPDATE, DELETE, OK };
|
||||||
|
|
||||||
virtual ~Entity() = 0;
|
virtual ~Entity() = 0;
|
||||||
const boost::uuids::uuid& getUuid() const { return uuid_; };
|
const boost::uuids::uuid& getUuid() const { return uuid_; };
|
||||||
|
|
|
@ -51,6 +51,6 @@ BOOST_AUTO_TEST_CASE(seller_states)
|
||||||
std::cout << "Anzahl sellers: " << sellers.size() << "\n";
|
std::cout << "Anzahl sellers: " << sellers.size() << "\n";
|
||||||
BOOST_TEST((sellers.at(0).getState() == Entity::State::NEW));
|
BOOST_TEST((sellers.at(0).getState() == Entity::State::NEW));
|
||||||
BOOST_TEST(db.storeSellers(sellers) == 1);
|
BOOST_TEST(db.storeSellers(sellers) == 1);
|
||||||
BOOST_TEST((sellers.at(0).getState() == Entity::State::CLEAN));
|
BOOST_TEST((sellers.at(0).getState() == Entity::State::OK));
|
||||||
BOOST_TEST(db.storeSellers(sellers) == 0);
|
BOOST_TEST(db.storeSellers(sellers) == 0);
|
||||||
}
|
}
|
Loading…
Reference in a new issue