mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-21 13:53:11 -07:00
Fixing TestHistoryClearCommand Test (#1253)
This commit is contained in:
parent
178075d7d7
commit
60a7ee3604
1 changed files with 0 additions and 14 deletions
|
@ -56,18 +56,6 @@ namespace CalculatorFunctionalTests
|
||||||
m_standardViewModel->ResetCalcManager(false);
|
m_standardViewModel->ResetCalcManager(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsHistoryContainerEmpty(_In_ String ^ historyContainerKey)
|
|
||||||
{
|
|
||||||
ApplicationDataContainer ^ localSettings = ApplicationData::Current->LocalSettings;
|
|
||||||
return !(localSettings->Containers->HasKey(historyContainerKey));
|
|
||||||
}
|
|
||||||
|
|
||||||
String^ GetHistoryContainerKeyHelper(CalculationManager::CalculatorMode cMode)
|
|
||||||
{
|
|
||||||
ValueType^ modeValue = static_cast<int>(cMode);
|
|
||||||
return String::Concat(modeValue->ToString(), L"_History");
|
|
||||||
}
|
|
||||||
|
|
||||||
void AddSingleHistoryItem()
|
void AddSingleHistoryItem()
|
||||||
{
|
{
|
||||||
Initialize();
|
Initialize();
|
||||||
|
@ -189,8 +177,6 @@ namespace CalculatorFunctionalTests
|
||||||
m_standardViewModel->SendCommandToCalcManager(static_cast<int>(Command::CommandEQU));
|
m_standardViewModel->SendCommandToCalcManager(static_cast<int>(Command::CommandEQU));
|
||||||
m_historyViewModel->OnClearCommand(nullptr);
|
m_historyViewModel->OnClearCommand(nullptr);
|
||||||
VERIFY_ARE_EQUAL(0, m_historyViewModel->ItemsCount);
|
VERIFY_ARE_EQUAL(0, m_historyViewModel->ItemsCount);
|
||||||
VERIFY_IS_TRUE(IsHistoryContainerEmpty(GetHistoryContainerKeyHelper(CalculatorMode::Standard)));
|
|
||||||
VERIFY_IS_TRUE(IsHistoryContainerEmpty(GetHistoryContainerKeyHelper(CalculatorMode::Scientific)));
|
|
||||||
Cleanup();
|
Cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue