From c680c82705ec5d332083e9526fc4554d54208b88 Mon Sep 17 00:00:00 2001
From: Viktoria <Vicky@Kays-Mac.fritz.box>
Date: Thu, 26 Mar 2020 13:55:05 +0100
Subject: [PATCH] wip

---
 enzevalos_iphoneTests/GeneratedMocks.swift         |  4 ++--
 .../phishing/MailComparisonTests.swift             | 14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/enzevalos_iphoneTests/GeneratedMocks.swift b/enzevalos_iphoneTests/GeneratedMocks.swift
index d851f4eb..5b10d86d 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 3e35269d..9218ded7 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))!)
-- 
GitLab