public void TestImportPhonebookEntriesFromCsv() { var fileName = @"Telefonbuch.csv"; var list = Utility.ReadCsvFile(fileName); ushort phonebookId = 0; uint uniqueId = 0; uint phonebookEntryID = 0; foreach (var item in list) { if (!Enum.TryParse <NumberType>(item.Item5, out NumberType nmbrType)) { nmbrType = NumberType.Home; } if (!ushort.TryParse(item.Item1, out ushort ctgry)) { ctgry = 0; } _fb.AddOrUpdatePhonebookEntry(phonebookId: phonebookId, phonebookEntryID: phonebookEntryID, uniqueId: uniqueId, name: item.Item3, telephonyNumbers: new List <contactTelephonyNumber>() { new contactTelephonyNumber() { Value = item.Item4, type = nmbrType.ToString("G") } }, category: ctgry); uniqueId++; phonebookEntryID++; } }
public void TestAddOrUpdatePhonebookEntry() { _fb.AddOrUpdatePhonebookEntry(phonebookId: 0, uniqueId: 319, name: "Mustermann, Marianne", number: "+49 1234 55555", numberType: NumberType.Home); }