diff --git a/enzevalos_iphoneTests/GeneratedMocks.swift b/enzevalos_iphoneTests/GeneratedMocks.swift index d851f4eb5f91ae075a8539d074f87d2053ea98b3..5b10d86dae3da2db27f5328473e519f832d244f8 100644 --- a/enzevalos_iphoneTests/GeneratedMocks.swift +++ b/enzevalos_iphoneTests/GeneratedMocks.swift @@ -1,4 +1,4 @@ -// MARK: - Mocks generated from file: enzevalos_iphone/AuthenticationModel.swift at 2020-03-25 20:03:07 +0000 +// MARK: - Mocks generated from file: enzevalos_iphone/AuthenticationModel.swift at 2020-03-26 12:47:18 +0000 // // AuthenticationModel.swift @@ -653,7 +653,7 @@ import Foundation } -// MARK: - Mocks generated from file: enzevalos_iphone/AuthenticationViewModel.swift at 2020-03-25 20:03:07 +0000 +// MARK: - Mocks generated from file: enzevalos_iphone/AuthenticationViewModel.swift at 2020-03-26 12:47:18 +0000 // // AuthenticationViewModel.swift diff --git a/enzevalos_iphoneTests/phishing/MailComparisonTests.swift b/enzevalos_iphoneTests/phishing/MailComparisonTests.swift index 3e35269d99fc55fe9a22032e96a11d351b4731d9..9218ded707c84db79e26df766a20ad674f384e68 100644 --- a/enzevalos_iphoneTests/phishing/MailComparisonTests.swift +++ b/enzevalos_iphoneTests/phishing/MailComparisonTests.swift @@ -73,29 +73,29 @@ class MailComparisonTests: XCTestCase { if mail?.from.contact?.getMailAddresses() == senderAddress{ return "has alrady send an email" }*/ - return "false" // 3. ich will wissen, ob wenn der sender unbekannt, eine ähnliche mailaddresse schon einmal ankam - + + return "false" } /************** End Code ****************/ + func createAddressBook(){ + let _ = datahandler.getContactByMCOAddress(address: user) + } func testCompareSenderToContacts () { - let x = datahandler.getContactByMCOAddress(address: user) - var contacts = datahandler.getContacts() - contacts.append(x) + createAddressBook() let mail_1 = testMail(from: user, to: [], cc: [], bcc: []) let mail_2 = testMail(from: user_1, to: [], cc: [], bcc: []) let mail_3 = testMail(from: user_2, to: [], cc: [], bcc: []) let mail_4 = testMail(from: user_2, to: [], cc: [], bcc: []) let mailsInInbox: [PersistentMail] = [mail_1!, mail_2!, mail_3!, mail_4!] XCTAssertEqual("is a contact", compareSenderToContacts(mail_1)) - XCTAssertEqual("send mails before", compareSenderToContacts(mail_2)) +// XCTAssertEqual("send mails before", compareSenderToContacts(mail_2)) // XCTAssertEqual("has alrady send an email", compareSenderToContacts(mailsInInbox[2])) // XCTAssertEqual("false", compareSenderToContacts(mail_2)) - XCTAssertNotEqual(testMail(from: user, to: [], cc: [], bcc: [])?.from.contact?.cnContact?.getMailAddresses().count, 0 ) XCTAssertTrue((testMail(from: user, to: [], cc: [], bcc: [])?.from.contact?.isAddress(mailadr: userAdr))!) XCTAssertTrue((testMail(from: user_1, to: [], cc: [], bcc: [])?.from.contact?.isAddress(mailadr: userAdr_1))!)