Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added unit tests for the GetAccountFile function.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 20 Mar 2016 15:14:46 +0000 (15:14 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 20 Mar 2016 15:14:46 +0000 (15:14 +0000)
source/tests/xestiaab_common.h

index 7beaa1b..248582e 100644 (file)
@@ -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/<user>/.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
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy