mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2025-12-12 20:32:15 +00:00
starting position should include item printer
This commit is contained in:
parent
3ee479a731
commit
e1fdd00962
@ -1,14 +1,21 @@
|
||||
#include "catch2/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#include "ApprovalTests.hpp"
|
||||
|
||||
#include "GildedRose.h"
|
||||
|
||||
TEST_CASE("Foo") {
|
||||
std::ostream& operator<<(std::ostream& os, const Item& obj)
|
||||
{
|
||||
return os
|
||||
<< "name: " << obj.name
|
||||
<< ", sellIn: " << obj.sellIn
|
||||
<< ", quality: " << obj.quality;
|
||||
}
|
||||
|
||||
TEST_CASE("UpdateQuality") {
|
||||
|
||||
vector<Item> items;
|
||||
items.push_back(Item("foo", 0, 0));
|
||||
GildedRose app(items);
|
||||
app.updateQuality();
|
||||
REQUIRE("fixme" == app.items[0].name);
|
||||
|
||||
REQUIRE("foo" == app.items[0].name);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user