// Check that the vCard is a valid vCard 4.0 file.
-
vCard vCard4FormatCheck;
vCard4FormatCheck.LoadFile(Filename);
return CONTACTLOAD_FILEINVALIDFORMAT;
}
+
+ // Check that the vCard meets the base specification.
+
+ if (!vCard4FormatCheck.MeetBaseSpecification()){
+
+ return CONTACTLOAD_FILEBASESPECFAIL;
+
+ }
+
+
return CONTACTLOAD_UNITTESTFAIL;
CONTACTLOAD_UNITTESTFAIL = -1,
CONTACTLOAD_FILEMISSING,
CONTACTLOAD_FILEERROR,
- CONTACTLOAD_FILEINVALIDFORMAT
+ CONTACTLOAD_FILEINVALIDFORMAT,
+ CONTACTLOAD_FILEBASESPECFAIL
};
class ContactDataObject{
ASSERT_EQ(CONTACTLOAD_FILEINVALIDFORMAT, TestFile.LoadFile("LoadCheck-Load1-v3.vcf"));
+ // Check that the vCard 4.0 file meets the base specification.
+
+ ASSERT_EQ(CONTACTLOAD_FILEBASESPECFAIL, TestFile.LoadFile("LoadCheck-Load3.vcf"));
+
}
// TODO: Add tests for the Contact Loading process.
\ No newline at end of file