mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Stop mocking and start injecting for tests.
Took 15 minutes
This commit is contained in:
parent
0d2b498e55
commit
df710dd104
6 changed files with 39 additions and 464 deletions
|
|
@ -1,13 +1,18 @@
|
|||
#include "mocks.h"
|
||||
#include "test_card_database_path_provider.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include <libcockatrice/interfaces/noop_card_preference_provider.h>
|
||||
#include <libcockatrice/interfaces/noop_card_set_priority_controller.h>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
TEST(CardDatabaseTest, LoadXml)
|
||||
{
|
||||
CardDatabase *db = new CardDatabase;
|
||||
CardDatabase *db = new CardDatabase(nullptr, QSharedPointer<NoopCardPreferenceProvider>::create(),
|
||||
QSharedPointer<TestCardDatabasePathProvider>::create(),
|
||||
QSharedPointer<NoopCardSetPriorityController>::create());
|
||||
|
||||
// ensure the card database is empty at start
|
||||
ASSERT_EQ(0, db->getCardList().size()) << "Cards not empty at start";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue