From d718ddf04cf4126a1381b0ef1d4e401680603cfa Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Mon, 27 Jun 2016 22:07:04 +0100 Subject: [PATCH] Setup unit test for testing the LoadCheck-Load2.vcf file --- source/tests/xestiaab_contactsave.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/tests/xestiaab_contactsave.h b/source/tests/xestiaab_contactsave.h index b8834b8..3459f7c 100644 --- a/source/tests/xestiaab_contactsave.h +++ b/source/tests/xestiaab_contactsave.h @@ -23,6 +23,7 @@ TEST(ContactSave, ContactSaveTests){ ContactDataObject TestFile1; + ContactDataObject TestFile2; wxString SaveData; wxString SaveDataCompare = "BEGIN:VCARD\n" "VERSION:4.0\n" @@ -37,4 +38,19 @@ TEST(ContactSave, ContactSaveTests){ ASSERT_EQ(CONTACTSAVE_OK, TestFile1.SaveString(&SaveData)); ASSERT_EQ(SaveDataCompare, SaveData); + ASSERT_EQ(CONTACTLOAD_OK, TestFile2.LoadFile("LoadCheck-Load2.vcf")); + + SaveData.clear(); + SaveDataCompare = "BEGIN:VCARD\n" + "VERSION:4.0\n" + "PRODID:-//Xestia//Address Book Unit Testing//KW\n" + "FN:Test vCard\n" + "TITLE:The Third Title\n" + "TITLE:Knight of the Tests\n" + "TITLE:The Tester of Cornwall\n" + "END:VCARD"; + + ASSERT_EQ(CONTACTSAVE_OK, TestFile2.SaveString(&SaveData)); + ASSERT_EQ(SaveDataCompare, SaveData); + } \ No newline at end of file -- 2.39.5