mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Updating IContext to our current style and making it less reliant on macros.
Updating code that uses IContext to a more conformant pattern of usage.
This commit is contained in:
@@ -17,17 +17,17 @@ namespace BlackCoreTest
|
||||
|
||||
void CTestNetMediators::initTestCase()
|
||||
{
|
||||
BlackMisc::IContext::getInstance().setSingleton<INetwork>(&m_networkDummy);
|
||||
m_context.setObject<INetwork>(m_networkDummy);
|
||||
}
|
||||
|
||||
void CTestNetMediators::cleanupTestCase()
|
||||
{
|
||||
BlackMisc::IContext::getInstance().releaseSingleton<INetwork>();
|
||||
m_context.removeObject<INetwork>();
|
||||
}
|
||||
|
||||
void CTestNetMediators::atcListManagerTest()
|
||||
{
|
||||
CAtcListManager mgr;
|
||||
CAtcListManager mgr(m_context);
|
||||
AtcListConsumer cons;
|
||||
|
||||
QObject::connect(&mgr, &IAtcListManager::listChanged, &cons, &AtcListConsumer::listChanged);
|
||||
|
||||
@@ -45,6 +45,7 @@ namespace BlackCoreTest
|
||||
void cleanupTestCase();
|
||||
|
||||
private:
|
||||
BlackMisc::CApplicationContext m_context;
|
||||
BlackCore::NetworkDummy m_networkDummy;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user