From: Steve Brokenshire Date: Sun, 20 Mar 2016 15:14:46 +0000 (+0000) Subject: Added unit tests for the GetAccountFile function. X-Git-Tag: release-0.11~25 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=d4087a12e1dccd74c089f2583500578fa5e59212;p=xestiaab%2F.git Added unit tests for the GetAccountFile function. --- diff --git a/source/tests/xestiaab_common.h b/source/tests/xestiaab_common.h index 7beaa1b..248582e 100644 --- a/source/tests/xestiaab_common.h +++ b/source/tests/xestiaab_common.h @@ -151,4 +151,30 @@ TEST(CommonFunctions, GetAccountDirCertificate){ #endif +} + +TEST(CommonFunctions, GetAccountsFile){ + + // Run the unit tests depending on the operating system being used. + +#if defined(__WIN32__) + +#elif defined(__APPLE__) + +#else + + // Setup for comparison purposes. Should be + // /home//.xestiaab/preferences/accounts + + wxString AccountsFileCheck = ""; + AccountsFileCheck.Clear(); + AccountsFileCheck.Append(wxString::FromUTF8(getenv("HOME"))); + AccountsFileCheck.Append(wxT("/.xestiaab/preferences/accounts")); + + wxString AccountsFile = GetAccountsFile(); + + ASSERT_EQ(AccountsFile, AccountsFileCheck); + +#endif + } \ No newline at end of file