Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Unit Tests: Updated copyright year on modified files
[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         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         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         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         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         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         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         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         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         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         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         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;
636 static int itemIndex = 0;
638 static mapExample.insert(std::make_pair(0,1));
639 static mapExample.insert(std::make_pair(1,1));
640 static mapExample.insert(std::make_pair(2,1));
641 static mapExample.insert(std::make_pair(5,1));
642 static mapExample.insert(std::make_pair(500,1));
643 static mapExample.insert(std::make_pair(2415,1));
644 static mapExistsStatus = false;
646 TEST(CommonFunctions, GivenMapExistsStatusIsFalseAndItemIndexIs0WhenMapDataExistsIsCalledThenConfirmItemIndex0DoesExist)
649         // Tests for checking that map data exists.
651         // Given
653         mapExistsStatus = false;
654         itemIndex = 0;
655         
656         // When
658         mapExistsStatus = MapDataExists(&itemIndex, &mapExample);
660         // Then
662         ASSERT_EQ(true, mapExistsStatus);
666 TEST(CommonFunctions, GivenMapExistsStatusIsFalseAndItemIndexIs1WhenMapDataExistsIsCalledThenConfirmItemIndex1DoesExist)
669         // Tests for checking that map data exists.
671         // Given
673         mapExistsStatus = false;
674         itemIndex = 1;
675         
676         // When
677         
678         mapExistsStatus = MapDataExists(&itemIndex, &mapExample);
679         
680         // Then
681         
682         ASSERT_EQ(true, mapExistsStatus);
686 TEST(CommonFunctions, GivenMapExistsStatusIsFalseAndItemIndexIs2WhenMapDataExistsIsCalledThenConfirmItemIndex2DoesExist)
689         // Tests for checking that map data exists.
691         // Given
693         mapStatusExists = false;
694         itemIndex = 2;
695         
696         // When
697         
698         mapStatusExists = MapDataExists(&itemIndex, &mapExample);
699         
700         // Then
701         
702         ASSERT_EQ(true, mapStatusExists);
703         
706 TEST(CommonFunctions, GivenMapExistsStatusIsTrueAndItemIndexIs3WhenMapDataExistsIsCalledThenConfirmItemIndex3DoesntExist)
709         // Tests for checking that map data exists.
711         // Given
713         mapStatusExists = true;
714         itemIndex = 3;
715         
716         // When
717         
718         mapStatusExists = MapDataExists(&itemIndex, &mapExample);
719         
720         // Then
721         
722         ASSERT_EQ(false, mapStatusExists);
723         
726 TEST(CommonFunctions, GivenMapExistsStatusIsFalseAndItemIndexIs5WhenMapDataExistsIsCalledThenConfirmItemIndex5DoesExist)
729         // Tests for checking that map data exists.
731         // Given
733         mapStatusExists = false;
734         itemIndex = 5;
735         
736         // When
737         
738         mapStatusExists = MapDataExists(&itemIndex, &mapExample);
739         
740         // Then
741         
742         ASSERT_EQ(true, mapStatusExists);
746 TEST(CommonFunctions, GivenMapExistsStatusIsTrueAndItemIndexIs6WhenMapDataExistsIsCalledThenConfirmItemIndex6DoesntExist)
749         // Tests for checking that map data exists.
751         // Given
753         mapStatusExists = true;
754         itemIndex = 6;
755         
756         // When
758         mapStatusExists = MapDataExists(&itemIndex, &mapExample);
759         
760         // Then
761         
762         ASSERT_EQ(false, mapStatusExists);
766 TEST(CommonFunctions, GivenMapExistsStatusIsFalseAndItemIndexIs499WhenMapDataExistsIsCalledThenConfirmItemIndex499DoesntExist)
769         // Tests for checking that map data exists.
771         // Given
773         mapStatusExists = false;
774         itemIndex = 499;
775         
776         // When
777         
778         mapStatusExists = MapDataExists(&itemIndex, &mapExample);
779         
780         // Then
781         
782         ASSERT_EQ(false, mapStatusExists);
786 TEST(CommonFunctions, GivenMapExistsStatusIsFalseAndItemIndexIs500WhenMapDataExistsIsCalledThenConfirmItemIndex500DoesExist)
789         // Tests for checking that map data exists.
791         // Given
793         mapStatusExists = false;
794         itemIndex = 500;
795         
796         // When
797         
798         mapStatusExists = MapDataExists(&itemIndex, &mapExample);
799         
800         // Then
801         
802         ASSERT_EQ(true, mapStatusExists);
803         
806 TEST(CommonFunctions, GivenMapExistsStatusIsTrueAndItemIndexIs501WhenMapDataExistsIsCalledThenConfirmItemIndex501DoesntExist)
809         // Tests for checking that map data exists.
811         // Given
813         mapStatusExists = true;
814         itemIndex = 501;
815         
816         // When
817         
818         mapStatusExists = MapDataExists(&itemIndex, &mapExample);
819         
820         // Then
821         
822         ASSERT_EQ(false, mapStatusExists);
826 TEST(CommonFunctions, GivenMapExistsStatusIsTrueAndItemIndexIs2414WhenMapDataExistsIsCalledThenConfirmItemIndex2414DoesntExist)
829         // Tests for checking that map data exists.
831         // Given
833         mapStatusExists = true;
834         itemIndex = 2414;
835         
836         // When
837         
838         mapStatusExists = MapDataExists(&itemIndex, &mapExample);
839         
840         // Then
841         
842         ASSERT_EQ(false, mapStatusExists);
846 TEST(CommonFunctions, GivenMapExistsStatusIsFalseAndItemIndexIs2415WhenMapDataExistsIsCalledThenConfirmItemIndex2415DoesExist)
849         // Tests for checking that map data exists.
851         // Given
853         mapStatusExists = false;
854         itemIndex = 2415;
855         
856         // When
857         
858         mapStatusExists = MapDataExists(&itemIndex, &mapExample);
859         
860         // Then
861         
862         ASSERT_EQ(true, mapStatusExists);
866 TEST(CommonFunctions, GivenMapExistsStatusIsTrueAndItemIndexIs2416WhenMapDataExistsIsCalledThenConfirmItemIndex2416DoesntExist)
869         // Tests for checking that map data exists.
871         // Given
873         mapStatusExists = true;
874         itemIndex = 2416;
875         
876         // When
877         
878         mapStatusExists = MapDataExists(&itemIndex, &mapExample);
879         
880         // Then
881         
882         ASSERT_EQ(false, mapStatusExists);
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