Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Unit Tests: Clean up of Common, ContactLoad and ContactSave tests
[xestiaab/.git] / source / tests / xestiaab_common.h
1  // xestiaab_common.h - Xestia Address Book Common Functions Unit Tests.
2 //
3 // (c) 2012-2017 Xestia Software Development.
4 //
5 // This file is part of Xestia Address Book.
6 //
7 // Xestia Address Book is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by the
9 // Free Software Foundation, version 3 of the license.
10 //
11 // Xestia Address Book is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License along
17 // with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
19 #include <gtest/gtest.h>
20 #include "../common/dirs.h"
21 #include "../common/filename.h"
22 #include "../common/mime.h"
23 #include "../common/svrblist.h"
24 #include "../common/textprocessing.h"
26 static wxString AccountInput1 = "Example1";
27 static wxString AccountInput2 = "Example2";
28 static wxString AccountInput3 = "Example3";
30 TEST(CommonFunctions, GivenAPredefinedPathWhenGetUserDirIsCalledThenReceivedPathMatches)
31 {
32         
33         // Run the unit tests depending on the operating system being used.
34         
35 #if defined(__WIN32__)
36         
37 #elif defined(__APPLE__)
38         
39 #else
40         
41         // Setup for comparison purposes. Should be /home/<user>/.xestiaab
42         
43         // Given
44         
45         wxString UserDirCheck = "";
46         UserDirCheck.Append(wxString::FromUTF8(getenv("HOME")));
47         UserDirCheck.Append(wxT("/.xestiaab/"));
48         
49         // When
50         
51         wxString UserDir = GetUserDir();
52         
53         // Then
54         
55         ASSERT_EQ(UserDir, UserDirCheck);
56         
57 #endif
58         
59 }
61 TEST(CommonFunctions, GivenAPredefinedPathWhenGetUserPrefDirIsCalledThenReceivedPathMatches)
62 {
63         
64         // Run the unit tests depending on the operating system being used.
65         
66 #if defined(__WIN32__)
67         
68 #elif defined(__APPLE__)
69         
70 #else
71         
72         // Setup for comparison purposes. Should be /home/<user>/.xestiaab/preferences
73         
74         // Given
75         
76         wxString UserPrefDirCheck = "";
77         UserPrefDirCheck.Append(wxString::FromUTF8(getenv("HOME")));
78         UserPrefDirCheck.Append(wxT("/.xestiaab/preferences/"));
79         
80         // When
81         
82         wxString UserPrefDir = GetUserPrefDir();
83         
84         // Then
85         
86         ASSERT_EQ(UserPrefDir, UserPrefDirCheck);
87         
88 #endif
90 }
92 TEST(CommonFunctions, GivenThreePredefinedPathsWhenGetAccountDirIsCalledForEachThenReceivedPathsMatches)
93 {
94         
95         // Run the unit tests depending on the operating system being used.
96         
97 #if defined(__WIN32__)
98         
99 #elif defined(__APPLE__)
100         
101 #else
102         
103         // Setup for comparison purposes. Should be /home/<user>/.xestiaab/preferences
104         
105         wxString AccountDirCheck1 = "";
106         wxString AccountDirCheck2 = "";
107         wxString AccountDirCheck3 = "";
108         
109         // Given
110         
111         AccountDirCheck1.Append(wxString::FromUTF8(getenv("HOME")));
112         AccountDirCheck1.Append(wxT("/.xestiaab/accounts/"));
113         AccountDirCheck1.Append("Example1");
114         AccountDirCheck1.Append(wxT("/"));
116         AccountDirCheck2.Append(wxString::FromUTF8(getenv("HOME")));
117         AccountDirCheck2.Append(wxT("/.xestiaab/accounts/"));
118         AccountDirCheck2.Append("Example2");
119         AccountDirCheck2.Append(wxT("/"));      
120         
121         AccountDirCheck3.Append(wxString::FromUTF8(getenv("HOME")));
122         AccountDirCheck3.Append(wxT("/.xestiaab/accounts/"));
123         AccountDirCheck3.Append("Example3");
124         AccountDirCheck3.Append(wxT("/"));
125         
126         // When
127         
128         wxString AccountDir1 = GetAccountDir(AccountInput1, false);
129         wxString AccountDir2 = GetAccountDir(AccountInput2, false);
130         wxString AccountDir3 = GetAccountDir(AccountInput3, false);
132         // Then
134         ASSERT_EQ(AccountDir1, AccountDirCheck1);
135         ASSERT_EQ(AccountDir2, AccountDirCheck2);
136         ASSERT_EQ(AccountDir3, AccountDirCheck3);
137         
138 #endif
139         
142 TEST(CommonFunctions, GivenThreePredefinedFilePathsWhenGetAccountDirIsCalledWithAppendServerCertificateSetToTrueForEachThenReceivedPathsMatches)
144         
145         // Run the unit tests depending on the operating system being used.
146         
147 #if defined(__WIN32__)
148         
149 #elif defined(__APPLE__)
150         
151 #else
152         
153         // Setup for comparison purposes. Should be /home/<user>/.xestiaab/preferences
154         
155         wxString AccountDirCheck1 = "";
156         wxString AccountDirCheck2 = "";
157         wxString AccountDirCheck3 = "";
158         
159         // Given
160         
161         AccountDirCheck1.Append(wxString::FromUTF8(getenv("HOME")));
162         AccountDirCheck1.Append(wxT("/.xestiaab/accounts/"));
163         AccountDirCheck1.Append("Example1");
164         AccountDirCheck1.Append(wxT("/server.crt"));
166         AccountDirCheck2.Append(wxString::FromUTF8(getenv("HOME")));
167         AccountDirCheck2.Append(wxT("/.xestiaab/accounts/"));
168         AccountDirCheck2.Append("Example2");
169         AccountDirCheck2.Append(wxT("/server.crt"));
170         
171         AccountDirCheck3.Append(wxString::FromUTF8(getenv("HOME")));
172         AccountDirCheck3.Append(wxT("/.xestiaab/accounts/"));
173         AccountDirCheck3.Append("Example3");
174         AccountDirCheck3.Append(wxT("/server.crt"));
175         
176         // When
177         
178         wxString AccountDir1 = GetAccountDir(AccountInput1, true);
179         wxString AccountDir2 = GetAccountDir(AccountInput2, true);
180         wxString AccountDir3 = GetAccountDir(AccountInput3, true);
182         // Then
184         ASSERT_EQ(AccountDir1, AccountDirCheck1);
185         ASSERT_EQ(AccountDir2, AccountDirCheck2);
186         ASSERT_EQ(AccountDir3, AccountDirCheck3);
187         
188 #endif
189         
192 TEST(CommonFunctions, GivenPredefinedFilePathWhenGetAccountsFileIsCalledThenReceivedFilePathMatches)
194         
195         // Run the unit tests depending on the operating system being used.
196         
197 #if defined(__WIN32__)
198         
199 #elif defined(__APPLE__)
200         
201 #else
202         
203         // Setup for comparison purposes. Should be 
204         // /home/<user>/.xestiaab/preferences/accounts
205         
206         // Given
207         
208         wxString AccountsFileCheck = "";
209         AccountsFileCheck.Clear();
210         AccountsFileCheck.Append(wxString::FromUTF8(getenv("HOME")));
211         AccountsFileCheck.Append(wxT("/.xestiaab/preferences/accounts"));
212         
213         // When
214         
215         wxString AccountsFile = GetAccountsFile();
216         
217         // Then
218         
219         ASSERT_EQ(AccountsFile, AccountsFileCheck);
220         
221 #endif
222         
225 TEST(CommonFunctions, GivenPredefinedFilePathWhenGetSettingsFileIsCalledThenReceivedFilePathMatches)
227         
228         // Run the unit tests depending on the operating system being used.
229         
230 #if defined(__WIN32__)
231         
232 #elif defined(__APPLE__)
233         
234 #else
235         
236         // Setup for comparison purposes. Should be 
237         // /home/<user>/.xestiaab/preferences/accounts
238         
239         // Given
240         
241         wxString SettingsFileCheck = "";
242         SettingsFileCheck.Clear();
243         SettingsFileCheck.Append(wxString::FromUTF8(getenv("HOME")));
244         SettingsFileCheck.Append(wxT("/.xestiaab/preferences/settings"));
245         
246         // When
247         
248         wxString SettingsFile = GetSettingsFile();
249         
250         // Then
251         
252         ASSERT_EQ(SettingsFile, SettingsFileCheck);
253         
254 #endif
255         
258 TEST(CommonFunctions, GivenFivePredefinedFilenamePathsWhenCreateFilenamePathIsCalledThenReceivedPathMatches)
260         
261         // Run the unit tests depending on the operating system being used.
262         
263 #if defined(__WIN32__)
264         
265 #elif defined(__APPLE__)
266         
267 #else
269         // Given
271         wxString FilenamePath1 = "/test";
272         wxString FilenamePath2 = "/example/test";
273         wxString FilenamePath3 = "/home/meep/test";
274         wxString FilenamePath4 = "/home/meep/moo/test";
275         wxString FilenamePath5 = "/home/meep/moo/yargh/test";
277         // When
279         wxString GeneratedFilenamePath1 = CreateFilenamePath("", "test");
280         wxString GeneratedFilenamePath2 = CreateFilenamePath("/example", "test");
281         wxString GeneratedFilenamePath3 = CreateFilenamePath("/home/meep", "test");
282         wxString GeneratedFilenamePath4 = CreateFilenamePath("/home/meep/moo", "test"); 
283         wxString GeneratedFilenamePath5 = CreateFilenamePath("/home/meep/moo/yargh", "test");   
285         // Then
287         ASSERT_EQ(FilenamePath1, GeneratedFilenamePath1);
288         ASSERT_EQ(FilenamePath2, GeneratedFilenamePath2);
289         ASSERT_EQ(FilenamePath3, GeneratedFilenamePath3);
290         ASSERT_EQ(FilenamePath4, GeneratedFilenamePath4);
291         ASSERT_EQ(FilenamePath5, GeneratedFilenamePath5);
292         
293 #endif
294         
297 TEST(CommonFunctions, GivenTwoFilesWhenGetMIMEIsCalledThenBothFilesMIMETypesAreGiven)
299         
300         // Get the MIME type based on the files given.
301         
302         // Given
303         
304         wxString File1MIMEFormat = "";
305         wxString File2MIMEFormat = "";
306         
307         // When
308         
309         File1MIMEFormat = GetMIME("TextMIMEExample.txt");
310         File2MIMEFormat = GetMIME("PictureMIMEExample.png");
311         
312         // Then
313         
314         ASSERT_EQ("text/plain", GetMIME("TextMIMEExample.txt"));
315         ASSERT_EQ("image/png", GetMIME("PictureMIMEExample.png"));
316         
319 TEST(CommonFunctions, GivenTwoDomainNamesWhenCheckBlacklistIsCalledThenReturnsCorrectStatus)
321         
322         // Test that the blacklist is actually working.
324         // Given
325         
326         bool domainStatus = true;
327         
328         // When
329         
330         domainStatus = CheckBlacklist("example.com");
331         
332         // Then
333         
334         ASSERT_EQ(false, domainStatus);
335         
336         // When
337         
338         domainStatus = false;
339         domainStatus = CheckBlacklist("google.com");
340         
341         // Then
342         
343         ASSERT_EQ(true, domainStatus);
344         
347 TEST(CommonFunctions, GivenExampleStringWhenEscapeStringIsCalledThenReturnedStringIsExample)
350         // Test the escape string function.
352         // Given
354         wxString EscapeStringData = "Example";
355         
356         // When
357         
358         EscapeString(&EscapeStringData, false);
359         
360         // Then
361         
362         ASSERT_EQ("Example", EscapeStringData.ToStdString());
363         
366 TEST(CommonFunctions, GivenStringWithCommaWhenEscapeStringIsCalledThenCommaIsEscaped)
369         // Test the escape string function.
371         // Given
373         wxString EscapeStringData = "Here we go, an \"example\" of escaping string.";
374         
375         // When
376         
377         EscapeString(&EscapeStringData, false);
378         
379         // Then
380         
381         ASSERT_EQ("Here we go\\, an \"example\" of escaping string.", EscapeStringData.ToStdString());
385 TEST(CommonFunctions, GivenStringWithNewlineCharactersWhenEscapeStringIsCalledThenNewlinesAreEscaped)
388         // Test the escape string function.
390         // Given
392         wxString EscapeStringData = "Lets put some \nnew \nlines \nin \nhere.";
393         
394         // When
395         
396         EscapeString(&EscapeStringData, false);
397         
398         // Then
399         
400         ASSERT_EQ("Lets put some \\nnew \\nlines \\nin \\nhere.", EscapeStringData.ToStdString());
404 TEST(CommonFunctions, GivenAStringWithReturnCharactersWhenEscapeStringIsCalledThenReturnsAreRemoved)
407         // Test the escape string function.
409         // Given
411         wxString EscapeStringData = "Lets put some \r\nnew \r\nlines \r\nin \r\nhere.";
412         
413         // When
414         
415         EscapeString(&EscapeStringData, false);
416         
417         // Then
418         
419         ASSERT_EQ("Lets put some \\nnew \\nlines \\nin \\nhere.", EscapeStringData.ToStdString());
423 TEST(CommonFunctions, GivenStringWithBackslashesWhenEscapeStringIsCalledThenBackslashesAreEscaped)
426         // Test the escape string function.
428         // Given
430         wxString EscapeStringData = "A:\\path\\example\\lets\\have\\some\\fun";
431         
432         // When
433         
434         EscapeString(&EscapeStringData, false);
435         
436         // Then
437         
438         ASSERT_EQ("A:\\\\path\\\\example\\\\lets\\\\have\\\\some\\\\fun", EscapeStringData.ToStdString());
442 TEST(CommonFunctions, GivenExampleStringWhenCaptureStringIsCalledThenReturnedStringIsExample)
445         // Test the capture string function.
446         
447         // Given
448         
449         wxString CaptureStringData = "Example";
450         
451         // When
452         
453         CaptureString(&CaptureStringData, false);
454         
455         // Then
456         
457         ASSERT_EQ("Example", CaptureStringData.ToStdString());
461 TEST(CommonFunctions, GivenStringWithEscapedCommasWhenCaptureStringIsCalledThenCommasAreCaptured)
464         // Test the capture string function.
465         
466         // Given
467         
468         wxString CaptureStringData = "Here we go\\, an \"example\" of escaping string.";
469         
470         // When
471         
472         CaptureString(&CaptureStringData, false);
473         
474         // Then
475         
476         ASSERT_EQ("Here we go, an \"example\" of escaping string.", CaptureStringData.ToStdString());
480 TEST(CommonFunctions, GivenStringWithEscapedNewlinesWhenCaptureStringIsCalledThenNewlinesAreCaptured)
483         // Test the capture string function.
484         
485         // Given
486         
487         wxString CaptureStringData = "Lets put some \\nnew \\nlines \\nin \\nhere.";
488         
489         // When
490         
491         CaptureString(&CaptureStringData, false);
492         
493         // Then
494         
495         ASSERT_EQ("Lets put some \nnew \nlines \nin \nhere.", CaptureStringData.ToStdString());
499 TEST(CommonFunctions, GivenStringWithEscapedBackslashesWhenCaptureStringIsCalledThenBackslashesAreCaptured)
502         // Test the capture string function.
503         
504         // Given
505         
506         wxString CaptureStringData = "A:\\\\path\\\\example\\\\lets\\\\have\\\\some\\\\fun";
507         
508         // When
509         
510         CaptureString(&CaptureStringData, false);
511         
512         // Then
513         
514         ASSERT_EQ("A:\\path\\example\\lets\\have\\some\\fun", CaptureStringData.ToStdString());
518 TEST(CommonFunctions, GivenStringWithSeveralBackslashesWhenResetUnusedStringIsCalledThenStringIsReset)
521         // Tests for resetting an unused string.
523         // Given
525         wxString ResetUnusedStringData = "Random string with a \\\\\\\\serverpath\\\\location";
526         
527         // When
528         
529         ResetUnusedString(&ResetUnusedStringData);
530         
531         // Then
532         
533         ASSERT_EQ("Random string with a \\\\serverpath\\location", ResetUnusedStringData.ToStdString());        
537 TEST(CommonFunctions, GivenStringWithNewlinesWhenResetUnusedStringIsCalledThenStringIsFormatted)
540         // Tests for resetting an unused string.
542         // Given
544         wxString ResetUnusedStringData = "Some text \\nwith new \\nlines!";
545         
546         // When
547         
548         ResetUnusedString(&ResetUnusedStringData);
549         
550         // Then
551         
552         ASSERT_EQ("Some text \nwith new \nlines!", ResetUnusedStringData.ToStdString());
556 TEST(CommonFunctions, GivenStringWithSeveralCharactersWhenResetUnusedStringThenStringIsFormatted)
559         // Tests for resetting an unused string.
561         // Given
562         
563         wxString ResetUnusedStringData = "And now the list of characters: \\\\ \\n \\; \\,";
565         // When
567         ResetUnusedString(&ResetUnusedStringData);
569         // Then
571         ASSERT_EQ("And now the list of characters: \\ \n ; ,", ResetUnusedStringData.ToStdString());
575 TEST(CommonFunctions, GivenStringWhenConvertToHTMLIsCalledThenStringisHTMLEscaped)
578         // Tests for converting data for inserting into a HTML
579         // formatted document.
581         // Given
583         wxString ConvertToHTMLData = "The test line where < is probably better than >!";
584         
585         // When
586         
587         ConvertToHTML(&ConvertToHTMLData);
588         
589         // Then
590         
591         ASSERT_EQ("The test line where &lt; is probably better than &gt;!", ConvertToHTMLData.ToStdString());
595 TEST(CommonFunctions, GivenStringWithNewlineWhenConvertToHTMLIsCalledThenStringIsHTMLEscapedWithFormattedNewline)
598         // Tests for converting data for inserting into a HTML
599         // formatted document.
601         // Given
603         wxString ConvertToHTMLData = "More testing &<>\n";
604         
605         // When
606         
607         ConvertToHTML(&ConvertToHTMLData);
608         
609         // Then
610         
611         ASSERT_EQ("More testing &amp;&lt;&gt;<br>", ConvertToHTMLData.ToStdString());
615 TEST(CommonFunctions, GivenStringWithSeveralLinesWhenConvertToHTMLIsCalledThenStringIsHTMLEscapedWithFormattedNewlines)
618         // Tests for converting data for inserting into a HTML
619         // formatted document.
621         // Given
622                 
623         wxString ConvertToHTMLData = "This is the first line.\nThis is the second line.\nThis is the third line.";
624         
625         // When
626         
627         ConvertToHTML(&ConvertToHTMLData);
628         
629         // Then
630         
631         ASSERT_EQ("This is the first line.<br>This is the second line.<br>This is the third line.", ConvertToHTMLData.ToStdString());
635 static std::map<int,int> mapExample = 
637         { 0, 1 }, { 1, 1 }, { 2, 1 }, { 5, 1 }, { 500, 1 }, { 2415, 1 }
638 };
639 static int itemIndex = 0;
641 bool mapExistsStatus = false;
643 TEST(CommonFunctions, GivenMapExistsStatusIsFalseAndItemIndexIs0WhenMapDataExistsIsCalledThenConfirmItemIndex0DoesExist)
646         // Tests for checking that map data exists.
648         // Given
650         mapExistsStatus = false;
651         itemIndex = 0;
652         
653         // When
655         mapExistsStatus = MapDataExists(&itemIndex, &mapExample);
657         // Then
659         ASSERT_EQ(true, mapExistsStatus);
663 TEST(CommonFunctions, GivenMapExistsStatusIsFalseAndItemIndexIs1WhenMapDataExistsIsCalledThenConfirmItemIndex1DoesExist)
666         // Tests for checking that map data exists.
668         // Given
670         mapExistsStatus = false;
671         itemIndex = 1;
672         
673         // When
674         
675         mapExistsStatus = MapDataExists(&itemIndex, &mapExample);
676         
677         // Then
678         
679         ASSERT_EQ(true, mapExistsStatus);
683 TEST(CommonFunctions, GivenMapExistsStatusIsFalseAndItemIndexIs2WhenMapDataExistsIsCalledThenConfirmItemIndex2DoesExist)
686         // Tests for checking that map data exists.
688         // Given
690         mapExistsStatus = false;
691         itemIndex = 2;
692         
693         // When
694         
695         mapExistsStatus = MapDataExists(&itemIndex, &mapExample);
696         
697         // Then
698         
699         ASSERT_EQ(true, mapExistsStatus);
700         
703 TEST(CommonFunctions, GivenMapExistsStatusIsTrueAndItemIndexIs3WhenMapDataExistsIsCalledThenConfirmItemIndex3DoesntExist)
706         // Tests for checking that map data exists.
708         // Given
710         mapExistsStatus = true;
711         itemIndex = 3;
712         
713         // When
714         
715         mapExistsStatus = MapDataExists(&itemIndex, &mapExample);
716         
717         // Then
718         
719         ASSERT_EQ(false, mapExistsStatus);
720         
723 TEST(CommonFunctions, GivenMapExistsStatusIsFalseAndItemIndexIs5WhenMapDataExistsIsCalledThenConfirmItemIndex5DoesExist)
726         // Tests for checking that map data exists.
728         // Given
730         mapExistsStatus = false;
731         itemIndex = 5;
732         
733         // When
734         
735         mapExistsStatus = MapDataExists(&itemIndex, &mapExample);
736         
737         // Then
738         
739         ASSERT_EQ(true, mapExistsStatus);
743 TEST(CommonFunctions, GivenMapExistsStatusIsTrueAndItemIndexIs6WhenMapDataExistsIsCalledThenConfirmItemIndex6DoesntExist)
746         // Tests for checking that map data exists.
748         // Given
750         mapExistsStatus = true;
751         itemIndex = 6;
752         
753         // When
755         mapExistsStatus = MapDataExists(&itemIndex, &mapExample);
756         
757         // Then
758         
759         ASSERT_EQ(false, mapExistsStatus);
763 TEST(CommonFunctions, GivenMapExistsStatusIsFalseAndItemIndexIs499WhenMapDataExistsIsCalledThenConfirmItemIndex499DoesntExist)
766         // Tests for checking that map data exists.
768         // Given
770         mapExistsStatus = false;
771         itemIndex = 499;
772         
773         // When
774         
775         mapExistsStatus = MapDataExists(&itemIndex, &mapExample);
776         
777         // Then
778         
779         ASSERT_EQ(false, mapExistsStatus);
783 TEST(CommonFunctions, GivenMapExistsStatusIsFalseAndItemIndexIs500WhenMapDataExistsIsCalledThenConfirmItemIndex500DoesExist)
786         // Tests for checking that map data exists.
788         // Given
790         mapExistsStatus = false;
791         itemIndex = 500;
792         
793         // When
794         
795         mapExistsStatus = MapDataExists(&itemIndex, &mapExample);
796         
797         // Then
798         
799         ASSERT_EQ(true, mapExistsStatus);
800         
803 TEST(CommonFunctions, GivenMapExistsStatusIsTrueAndItemIndexIs501WhenMapDataExistsIsCalledThenConfirmItemIndex501DoesntExist)
806         // Tests for checking that map data exists.
808         // Given
810         mapExistsStatus = true;
811         itemIndex = 501;
812         
813         // When
814         
815         mapExistsStatus = MapDataExists(&itemIndex, &mapExample);
816         
817         // Then
818         
819         ASSERT_EQ(false, mapExistsStatus);
823 TEST(CommonFunctions, GivenMapExistsStatusIsTrueAndItemIndexIs2414WhenMapDataExistsIsCalledThenConfirmItemIndex2414DoesntExist)
826         // Tests for checking that map data exists.
828         // Given
830         mapExistsStatus = true;
831         itemIndex = 2414;
832         
833         // When
834         
835         mapExistsStatus = MapDataExists(&itemIndex, &mapExample);
836         
837         // Then
838         
839         ASSERT_EQ(false, mapExistsStatus);
843 TEST(CommonFunctions, GivenMapExistsStatusIsFalseAndItemIndexIs2415WhenMapDataExistsIsCalledThenConfirmItemIndex2415DoesExist)
846         // Tests for checking that map data exists.
848         // Given
850         mapExistsStatus = false;
851         itemIndex = 2415;
852         
853         // When
854         
855         mapExistsStatus = MapDataExists(&itemIndex, &mapExample);
856         
857         // Then
858         
859         ASSERT_EQ(true, mapExistsStatus);
863 TEST(CommonFunctions, GivenMapExistsStatusIsTrueAndItemIndexIs2416WhenMapDataExistsIsCalledThenConfirmItemIndex2416DoesntExist)
866         // Tests for checking that map data exists.
868         // Given
870         mapExistsStatus = true;
871         itemIndex = 2416;
872         
873         // When
874         
875         mapExistsStatus = MapDataExists(&itemIndex, &mapExample);
876         
877         // Then
878         
879         ASSERT_EQ(false, mapExistsStatus);
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