IOS-1495 set and remove test IOS-1521+IOS-1495
authorXavier Algarra <xavier@pep-project.org>
Wed, 15 May 2019 15:40:49 +0200
branchIOS-1521+IOS-1495
changeset 8626a7abd989ba9f
parent 8625 455df939d9be
child 8627 e3e57e6309e7
IOS-1495 set and remove test
pEpForiOSTests/Models/EmailListViewModelTest.swift
     1.1 --- a/pEpForiOSTests/Models/EmailListViewModelTest.swift	Wed May 15 15:09:02 2019 +0200
     1.2 +++ b/pEpForiOSTests/Models/EmailListViewModelTest.swift	Wed May 15 15:40:49 2019 +0200
     1.3 @@ -177,25 +177,26 @@
     1.4  
     1.5      // MARK: - Search section
     1.6  
     1.7 -    /*func testSetSearchFilterWith0results() {
     1.8 +    func testSetSearchFilterWith0results() {
     1.9          TestUtil.createMessages(number: 10, engineProccesed: true, inFolder: folder)
    1.10          setupViewModel()
    1.11          emailListVM.startMonitoring()
    1.12 -        setSearchFilter(text: "blabla@blabla.com")
    1.13 +        emailListVM.setSearch(forSearchText: "blabla@blabla.com")
    1.14          XCTAssertEqual(emailListVM.rowCount, 0)
    1.15      }
    1.16  
    1.17      func testRemoveSearchFilterAfter0Results() {
    1.18          TestUtil.createMessages(number: 10, engineProccesed: true, inFolder: folder)
    1.19          setupViewModel()
    1.20 +        emailListVM.startMonitoring()
    1.21          XCTAssertEqual(emailListVM.rowCount, 10)
    1.22 -        setSearchFilter(text: "blabla@blabla.com")
    1.23 +        emailListVM.setSearch(forSearchText: "blabla@blabla.com")
    1.24          XCTAssertEqual(emailListVM.rowCount, 0)
    1.25 -        removeSearchFilter()
    1.26 +        emailListVM.removeSearch()
    1.27          XCTAssertEqual(emailListVM.rowCount, 10)
    1.28      }
    1.29  
    1.30 -    func testSetSearchFilterAddressWith3results() {
    1.31 +    /*func testSetSearchFilterAddressWith3results() {
    1.32          let textToSearch = "searchTest@mail.com"
    1.33          TestUtil.createMessages(number: 10, engineProccesed: true, inFolder: folder)
    1.34          TestUtil.createMessage(inFolder: folder,