IOS-1511 renaming and adding getMime(url:) to MimeUtils IOS-1511
authorAlejandro Gelos <agp@pep.security>
Tue, 07 May 2019 12:39:30 +0200
branchIOS-1511
changeset 8510edfa54372606
parent 8505 d5c1397f65dd
child 8528 9efff090c789
IOS-1511 renaming and adding getMime(url:) to MimeUtils
pEpForiOS.xcodeproj/project.pbxproj
pEpForiOS/UI/Compose/Cells/AttachmentCell/AttachmentViewModel.swift
pEpForiOS/UI/Compose/Util/DocumentAttachmentPickerViewController/DocumentAttachmentPickerViewModel.swift
pEpForiOS/UI/Compose/Util/MediaAttachmentPickerProvider/MediaAttachmentPickerProviderViewModel.swift
pEpForiOS/UI/EmailDisplay/Background/AttachmentToLocalURLOperation.swift
pEpForiOS/UI/EmailDisplay/Background/AttachmentsViewOperation.swift
pEpForiOS/UI/EmailDisplay/EmailViewController.swift
pEpForiOS/UI/EmailDisplay/Stuff that is named Compose but is used only in EmailView/ComposeDataSource.swift
pEpForiOS/UI/EmailDisplay/Util/AttachmentsViewHelper.swift
pEpForiOS/Util/Extensions/NSAttributedString+pEp.swift
pEpForiOS/Util/Extensions/URL+MIME.swift
pEpForiOSTests/MiscTests.swift
pEpForiOSTests/StringHTMLExtensionTests.swift
pEpForiOSTests/TestUtils/PEPMessage+TestExtension.swift
pEpForiOSTests/TestUtils/TestUtil.swift
pEpForiOSTests/URL+MIME.swift
     1.1 --- a/pEpForiOS.xcodeproj/project.pbxproj	Tue May 07 11:19:58 2019 +0200
     1.2 +++ b/pEpForiOS.xcodeproj/project.pbxproj	Tue May 07 12:39:30 2019 +0200
     1.3 @@ -118,7 +118,6 @@
     1.4  		15410D252199ECD700BBF65F /* AttachmentViewModelTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15410D242199ECD700BBF65F /* AttachmentViewModelTest.swift */; };
     1.5  		1541D7ED1FC81D4200D52A5D /* URL+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1541D7EC1FC81D4200D52A5D /* URL+Extensions.swift */; };
     1.6  		1541D7F01FC81ED900D52A5D /* URL+ExtensionsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1541D7EF1FC81ED900D52A5D /* URL+ExtensionsTest.swift */; };
     1.7 -		1541D7F31FC8292D00D52A5D /* URL+MIME.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1541D7F21FC8292D00D52A5D /* URL+MIME.swift */; };
     1.8  		1541D7F51FC82A4900D52A5D /* URL+MIME.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1541D7F41FC82A4900D52A5D /* URL+MIME.swift */; };
     1.9  		1544BD0221524C9F0075C5A0 /* AttachmentFilterTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1544BD0121524C9F0075C5A0 /* AttachmentFilterTest.swift */; };
    1.10  		154D92CF20AC1745009A5868 /* MoveToFolderOperationTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 154D92CE20AC1744009A5868 /* MoveToFolderOperationTest.swift */; };
    1.11 @@ -605,7 +604,6 @@
    1.12  		15410D242199ECD700BBF65F /* AttachmentViewModelTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AttachmentViewModelTest.swift; sourceTree = "<group>"; };
    1.13  		1541D7EC1FC81D4200D52A5D /* URL+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "URL+Extensions.swift"; sourceTree = "<group>"; };
    1.14  		1541D7EF1FC81ED900D52A5D /* URL+ExtensionsTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "URL+ExtensionsTest.swift"; sourceTree = "<group>"; };
    1.15 -		1541D7F21FC8292D00D52A5D /* URL+MIME.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "URL+MIME.swift"; sourceTree = "<group>"; };
    1.16  		1541D7F41FC82A4900D52A5D /* URL+MIME.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "URL+MIME.swift"; sourceTree = "<group>"; };
    1.17  		1544BD0121524C9F0075C5A0 /* AttachmentFilterTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AttachmentFilterTest.swift; path = pEpForiOSTests/Models/Filter/AttachmentFilterTest.swift; sourceTree = SOURCE_ROOT; };
    1.18  		154D92CE20AC1744009A5868 /* MoveToFolderOperationTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoveToFolderOperationTest.swift; sourceTree = "<group>"; };
    1.19 @@ -1734,7 +1732,6 @@
    1.20  				431C2B181F38888B00D87FFD /* ConnectionTransport+AccountSettings.swift */,
    1.21  				43257C871F5067BE00DDC7F0 /* NSAttributedString+pEp.swift */,
    1.22  				1541D7EC1FC81D4200D52A5D /* URL+Extensions.swift */,
    1.23 -				1541D7F21FC8292D00D52A5D /* URL+MIME.swift */,
    1.24  				155050F11FE95D8A009CEAD2 /* UserNotificationTool+pEp.swift */,
    1.25  				439A23E420B40FAC00417AF5 /* PEP_rating+Extension.swift */,
    1.26  				1574D079211464CC00FEDC93 /* URL+MailTo.swift */,
    1.27 @@ -2803,7 +2800,6 @@
    1.28  				006BE6BC20F4B63C00DDE8C9 /* EmailDetailType.swift in Sources */,
    1.29  				00EB89AB20E3A27C00CDFA0D /* ThreadViewcontroller+SizeClasses.swift in Sources */,
    1.30  				43257C841F50629700DDC7F0 /* HtmlToAttributedTextSaxParser.swift in Sources */,
    1.31 -				1541D7F31FC8292D00D52A5D /* URL+MIME.swift in Sources */,
    1.32  				4351C2D61F4441190053381F /* man.c in Sources */,
    1.33  				150B8EB31FCEB93D00374438 /* UIUtils.swift in Sources */,
    1.34  				43AAC22A1F7A5AEE00F435F4 /* BaseTableViewController.swift in Sources */,
     2.1 --- a/pEpForiOS/UI/Compose/Cells/AttachmentCell/AttachmentViewModel.swift	Tue May 07 11:19:58 2019 +0200
     2.2 +++ b/pEpForiOS/UI/Compose/Cells/AttachmentCell/AttachmentViewModel.swift	Tue May 07 12:39:30 2019 +0200
     2.3 @@ -10,7 +10,7 @@
     2.4  
     2.5  class AttachmentViewModel: CellViewModel {
     2.6      public let attachment: Attachment
     2.7 -    private let mimeTypeUtil = MimeTypeUtil()
     2.8 +    private lazy var mimeTypeUtils = MimeTypeUtils()
     2.9  
    2.10      init(attachment: Attachment) {
    2.11          self.attachment = attachment
    2.12 @@ -24,6 +24,6 @@
    2.13      }
    2.14  
    2.15      public var fileExtension: String {
    2.16 -        return mimeTypeUtil?.fileExtension(mimeType: attachment.mimeType) ?? ""
    2.17 +        return mimeTypeUtils?.getFileExtension(attachment.mimeType) ?? ""
    2.18      }
    2.19  }
     3.1 --- a/pEpForiOS/UI/Compose/Util/DocumentAttachmentPickerViewController/DocumentAttachmentPickerViewModel.swift	Tue May 07 11:19:58 2019 +0200
     3.2 +++ b/pEpForiOS/UI/Compose/Util/DocumentAttachmentPickerViewController/DocumentAttachmentPickerViewModel.swift	Tue May 07 12:39:30 2019 +0200
     3.3 @@ -20,6 +20,7 @@
     3.4      lazy private var attachmentFileIOQueue = DispatchQueue(label:
     3.5          "security.pep.DocumentAttachmentPickerViewModel.attachmentFileIOQueue",
     3.6                                                             qos: .userInitiated)
     3.7 +    private let mimeUtils = MimeTypeUtils()
     3.8      weak public var resultDelegate: DocumentAttachmentPickerViewModelResultDelegate?
     3.9  
    3.10      public init(resultDelegate: DocumentAttachmentPickerViewModelResultDelegate? = nil) {
    3.11 @@ -59,7 +60,7 @@
    3.12      private func createAttachment(forSecurityScopedResource resourceUrl: URL,
    3.13                                    completion: @escaping (Attachment?) -> Void) {
    3.14          let cfUrl = resourceUrl as CFURL
    3.15 -        attachmentFileIOQueue.async {
    3.16 +        attachmentFileIOQueue.async { [weak self] in
    3.17              CFURLStartAccessingSecurityScopedResource(cfUrl)
    3.18              defer { CFURLStopAccessingSecurityScopedResource(cfUrl) }
    3.19              guard  let resourceData = try? Data(contentsOf: resourceUrl)  else {
    3.20 @@ -67,7 +68,8 @@
    3.21                  completion(nil)
    3.22                  return
    3.23              }
    3.24 -            let mimeType = resourceUrl.mimeType() ?? MimeTypeUtil.MimesType.defaultMimeType
    3.25 +            let mimeType = self?.mimeUtils?.getMimeType(resourceUrl) ??
    3.26 +                MimeTypeUtils.MimesType.defaultMimeType
    3.27              let filename = resourceUrl.fileName(includingExtension: true)
    3.28              let attachment = Attachment.create(data: resourceData,
    3.29                                                 mimeType: mimeType,
     4.1 --- a/pEpForiOS/UI/Compose/Util/MediaAttachmentPickerProvider/MediaAttachmentPickerProviderViewModel.swift	Tue May 07 11:19:58 2019 +0200
     4.2 +++ b/pEpForiOS/UI/Compose/Util/MediaAttachmentPickerProvider/MediaAttachmentPickerProviderViewModel.swift	Tue May 07 12:39:30 2019 +0200
     4.3 @@ -23,6 +23,7 @@
     4.4          "security.pep.MediaAttachmentPickerProviderViewModel.attachmentFileIOQueue",
     4.5                                                             qos: .userInitiated)
     4.6      private var numVideosSelected = 0
     4.7 +    private let mimeTypeUtils = MimeTypeUtils()
     4.8      weak public var resultDelegate: MediaAttachmentPickerProviderViewModelResultDelegate?
     4.9  
    4.10      public init(resultDelegate: MediaAttachmentPickerProviderViewModelResultDelegate?) {
    4.11 @@ -82,7 +83,7 @@
    4.12      private func createAttachment(forResource resourceUrl: URL,
    4.13                                    completion: @escaping (Attachment?) -> Void) {
    4.14          attachmentFileIOQueue.async { [weak self] in
    4.15 -            guard let me = self else {
    4.16 +            guard let `self` = self else {
    4.17                  Logger.frontendLogger.lostMySelf()
    4.18                  return
    4.19              }
    4.20 @@ -91,8 +92,9 @@
    4.21                  completion(nil)
    4.22                  return
    4.23              }
    4.24 -            let mimeType = resourceUrl.mimeType() ?? MimeTypeUtil.MimesType.defaultMimeType
    4.25 -            let filename = me.fileName(forVideoAt: resourceUrl)
    4.26 +            let mimeType = self.mimeTypeUtils?.getMimeType(resourceUrl) ??
    4.27 +                MimeTypeUtils.MimesType.defaultMimeType
    4.28 +            let filename = self.fileName(forVideoAt: resourceUrl)
    4.29              let attachment =  Attachment.create(data: resourceData,
    4.30                                                  mimeType: mimeType,
    4.31                                                  fileName: filename,
    4.32 @@ -111,9 +113,8 @@
    4.33          return fileName + numDisplay + "." + fileExtension
    4.34      }
    4.35  
    4.36 -    private func createAttachment(forAssetWithUrl assetUrl: URL,
    4.37 -                                  image: UIImage) -> Attachment {
    4.38 -        let mimeType = assetUrl.mimeType() ?? MimeTypeUtil.MimesType.defaultMimeType
    4.39 +    private func createAttachment(forAssetWithUrl assetUrl: URL, image: UIImage) -> Attachment {
    4.40 +        let mimeType = mimeTypeUtils?.getMimeType(assetUrl) ?? MimeTypeUtils.MimesType.defaultMimeType
    4.41          return Attachment.createFromAsset(mimeType: mimeType,
    4.42                                            assetUrl: assetUrl,
    4.43                                            image: image,
     5.1 --- a/pEpForiOS/UI/EmailDisplay/Background/AttachmentToLocalURLOperation.swift	Tue May 07 11:19:58 2019 +0200
     5.2 +++ b/pEpForiOS/UI/EmailDisplay/Background/AttachmentToLocalURLOperation.swift	Tue May 07 12:39:30 2019 +0200
     5.3 @@ -37,7 +37,7 @@
     5.4          
     5.5          var theURL = tmpDir.appendingPathComponent(fileName)
     5.6  
     5.7 -        if attachment.mimeType == MimeTypeUtil.MimesType.pdf {
     5.8 +        if attachment.mimeType == MimeTypeUtils.MimesType.pdf {
     5.9              theURL = theURL.appendingPathExtension("pdf")
    5.10          }
    5.11          do {
     6.1 --- a/pEpForiOS/UI/EmailDisplay/Background/AttachmentsViewOperation.swift	Tue May 07 11:19:58 2019 +0200
     6.2 +++ b/pEpForiOS/UI/EmailDisplay/Background/AttachmentsViewOperation.swift	Tue May 07 12:39:30 2019 +0200
     6.3 @@ -16,7 +16,7 @@
     6.4          case docAttachment(Attachment)
     6.5      }
     6.6  
     6.7 -    let mimeTypes: MimeTypeUtil?
     6.8 +    let mimeTypes: MimeTypeUtils?
     6.9      let message: Message
    6.10  
    6.11      /**
    6.12 @@ -29,7 +29,7 @@
    6.13       */
    6.14      var attachmentsCount = 0
    6.15  
    6.16 -    init(mimeTypes: MimeTypeUtil?, message: Message) {
    6.17 +    init(mimeTypes: MimeTypeUtils?, message: Message) {
    6.18          self.mimeTypes = mimeTypes
    6.19          self.message = message
    6.20  
     7.1 --- a/pEpForiOS/UI/EmailDisplay/EmailViewController.swift	Tue May 07 11:19:58 2019 +0200
     7.2 +++ b/pEpForiOS/UI/EmailDisplay/EmailViewController.swift	Tue May 07 12:39:30 2019 +0200
     7.3 @@ -649,7 +649,7 @@
     7.4  
     7.5      func didCreateLocally(attachment: Attachment, url: URL, cell: MessageCell, location: CGPoint,
     7.6                            inView: UIView?) {
     7.7 -        if attachment.mimeType == MimeTypeUtil.MimesType.pdf
     7.8 +        if attachment.mimeType == MimeTypeUtils.MimesType.pdf
     7.9              && QLPreviewController.canPreview(url as QLPreviewItem){
    7.10                  selectedAttachmentURL = url
    7.11                  let previewController = QLPreviewController()
     8.1 --- a/pEpForiOS/UI/EmailDisplay/Stuff that is named Compose but is used only in EmailView/ComposeDataSource.swift	Tue May 07 11:19:58 2019 +0200
     8.2 +++ b/pEpForiOS/UI/EmailDisplay/Stuff that is named Compose but is used only in EmailView/ComposeDataSource.swift	Tue May 07 12:39:30 2019 +0200
     8.3 @@ -66,7 +66,7 @@
     8.4              let fileExtesion: String?
     8.5          }
     8.6          public private(set) var attachments = [Attachment]()
     8.7 -        let mimeTypeUtil = MimeTypeUtil()
     8.8 +        let mimeTypeUtils = MimeTypeUtils()
     8.9  
    8.10          func count() -> Int {
    8.11              return attachments.count
    8.12 @@ -79,7 +79,7 @@
    8.13              }
    8.14              let attachment = attachments[index]
    8.15              return Row(fileName: attachment.fileName,
    8.16 -                       fileExtesion: mimeTypeUtil?.fileExtension(mimeType: attachment.mimeType) ?? "")
    8.17 +                       fileExtesion: mimeTypeUtils?.getFileExtension(attachment.mimeType) ?? "")
    8.18          }
    8.19  
    8.20          /// Adds an attachment to the data source and returns the index it has been inserted in.
     9.1 --- a/pEpForiOS/UI/EmailDisplay/Util/AttachmentsViewHelper.swift	Tue May 07 11:19:58 2019 +0200
     9.2 +++ b/pEpForiOS/UI/EmailDisplay/Util/AttachmentsViewHelper.swift	Tue May 07 12:39:30 2019 +0200
     9.3 @@ -29,7 +29,7 @@
     9.4          }
     9.5      }
     9.6  
     9.7 -    let mimeTypes = MimeTypeUtil()
     9.8 +    let mimeTypes = MimeTypeUtils()
     9.9      var buildOp: AttachmentsViewOperation?
    9.10      let operationQueue = OperationQueue()
    9.11  
    9.12 @@ -46,7 +46,7 @@
    9.13              attachment.fileName?.splitFileExtension() ?? (Constants.defaultFileName, nil)
    9.14          return AttachmentSummaryView.AttachmentInfo(
    9.15              filename: name.extractFileNameOrCid(),
    9.16 -            theExtension: ext ?? mimeTypes?.fileExtension(mimeType: attachment.mimeType))
    9.17 +            theExtension: ext ?? mimeTypes?.getFileExtension(attachment.mimeType))
    9.18      }
    9.19  
    9.20      func opFinished(theBuildOp: AttachmentsViewOperation) {
    10.1 --- a/pEpForiOS/Util/Extensions/NSAttributedString+pEp.swift	Tue May 07 11:19:58 2019 +0200
    10.2 +++ b/pEpForiOS/Util/Extensions/NSAttributedString+pEp.swift	Tue May 07 12:39:30 2019 +0200
    10.3 @@ -13,7 +13,7 @@
    10.4  class ToMarkdownDelegate: NSAttributedStringParsingDelegate {
    10.5      var attachments = [Attachment]()
    10.6  
    10.7 -    private lazy var mimeUtil = MimeTypeUtil()
    10.8 +    private lazy var mimeUtils = MimeTypeUtils()
    10.9  
   10.10      func stringFor(attachment: NSTextAttachment) -> String? {
   10.11          if let textAttachment = attachment as? TextAttachment,
   10.12 @@ -22,7 +22,7 @@
   10.13              let count = attachments.count
   10.14  
   10.15              let theID = MessageID.generateUUID()
   10.16 -            let theExt = mimeUtil?.fileExtension(mimeType: theAttachment.mimeType) ?? "jpg"
   10.17 +            let theExt = mimeUtils?.getFileExtension(theAttachment.mimeType) ?? "jpg"
   10.18              let cidBase = "attached-inline-image-\(count)-\(theExt)-\(theID)"
   10.19              let cidSrc = "cid:\(cidBase)"
   10.20              let cidUrl = "cid://\(cidBase)"
    11.1 --- a/pEpForiOS/Util/Extensions/URL+MIME.swift	Tue May 07 11:19:58 2019 +0200
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,17 +0,0 @@
    11.4 -//
    11.5 -//  URL+MIME.swift
    11.6 -//  pEp
    11.7 -//
    11.8 -//  Created by Andreas Buff on 24.11.17.
    11.9 -//  Copyright © 2017 p≡p Security S.A. All rights reserved.
   11.10 -//
   11.11 -
   11.12 -import Foundation
   11.13 -
   11.14 -import MessageModel
   11.15 -
   11.16 -extension URL {
   11.17 -    public func mimeType() -> String? {
   11.18 -        return MimeTypeUtil()?.mimeType(fileExtension: pathExtension)
   11.19 -    }
   11.20 -}
    12.1 --- a/pEpForiOSTests/MiscTests.swift	Tue May 07 11:19:58 2019 +0200
    12.2 +++ b/pEpForiOSTests/MiscTests.swift	Tue May 07 12:39:30 2019 +0200
    12.3 @@ -33,9 +33,9 @@
    12.4      }
    12.5  
    12.6      func testMimeTypeJson() {
    12.7 -        let mimeTypeController = MimeTypeUtil()
    12.8 -        let s = mimeTypeController?.mimeType(fileExtension: "pdf")
    12.9 -        XCTAssertEqual(s, MimeTypeUtil.MimesType.pdf)
   12.10 +        let mimeTypeController = MimeTypeUtils()
   12.11 +        let s = mimeTypeController?.getMimeType("pdf")
   12.12 +        XCTAssertEqual(s, MimeTypeUtils.MimesType.pdf)
   12.13      }
   12.14  
   12.15      func testBinaryIndex() {
    13.1 --- a/pEpForiOSTests/StringHTMLExtensionTests.swift	Tue May 07 11:19:58 2019 +0200
    13.2 +++ b/pEpForiOSTests/StringHTMLExtensionTests.swift	Tue May 07 12:39:30 2019 +0200
    13.3 @@ -114,7 +114,7 @@
    13.4          let alt1 = "Attached Image 1 (jpg)"
    13.5  
    13.6          let theData = "Not an image".data(using: .utf8)
    13.7 -        let theMimeType = MimeTypeUtil.MimesType.jpeg
    13.8 +        let theMimeType = MimeTypeUtils.MimesType.jpeg
    13.9          let attachment = Attachment.create(
   13.10              data: theData, mimeType: theMimeType, fileName: "cid:\(cid1)",
   13.11              size: theData?.count)
    14.1 --- a/pEpForiOSTests/TestUtils/PEPMessage+TestExtension.swift	Tue May 07 11:19:58 2019 +0200
    14.2 +++ b/pEpForiOSTests/TestUtils/PEPMessage+TestExtension.swift	Tue May 07 12:39:30 2019 +0200
    14.3 @@ -18,8 +18,8 @@
    14.4              return false
    14.5          }
    14.6          return attachments.count == 2 &&
    14.7 -            attachments[0].mimeType == MimeTypeUtil.MimesType.pgpEncrypted &&
    14.8 -            attachments[1].mimeType == MimeTypeUtil.MimesType.defaultMimeType &&
    14.9 +            attachments[0].mimeType == MimeTypeUtils.MimesType.pgpEncrypted &&
   14.10 +            attachments[1].mimeType == MimeTypeUtils.MimesType.defaultMimeType &&
   14.11              attachments[1].filename == "file://msg.asc"
   14.12      }
   14.13  }
    15.1 --- a/pEpForiOSTests/TestUtils/TestUtil.swift	Tue May 07 11:19:58 2019 +0200
    15.2 +++ b/pEpForiOSTests/TestUtils/TestUtil.swift	Tue May 07 12:39:30 2019 +0200
    15.3 @@ -507,7 +507,7 @@
    15.4          let contentDisposition = inlined ? Attachment.ContentDispositionType.inline : .attachment
    15.5  
    15.6          return Attachment.create(data: imageData,
    15.7 -                          mimeType: MimeTypeUtil.MimesType.jpeg,
    15.8 +                          mimeType: MimeTypeUtils.MimesType.jpeg,
    15.9                            fileName: imageFileName,
   15.10                            contentDisposition: contentDisposition)
   15.11      }
    16.1 --- a/pEpForiOSTests/URL+MIME.swift	Tue May 07 11:19:58 2019 +0200
    16.2 +++ b/pEpForiOSTests/URL+MIME.swift	Tue May 07 12:39:30 2019 +0200
    16.3 @@ -14,13 +14,13 @@
    16.4  
    16.5  class URL_MimeTest: XCTestCase {
    16.6      let pathBuilder = "file://ma/path/to/nice_pic"
    16.7 -    let mimeUtil = MimeTypeUtil()
    16.8 +    let mimeUtils = MimeTypeUtils()
    16.9  
   16.10      func testJpg() {
   16.11          let jpgExt = "jpg"
   16.12          let url = urlWithExtension(ext: jpgExt)
   16.13 -        let testee = url.mimeType()
   16.14 -        let expected = mimeUtil?.mimeType(fileExtension: jpgExt)
   16.15 +        let testee = mimeUtils?.getMimeType(url)
   16.16 +        let expected = mimeUtils?.getMimeType(jpgExt)
   16.17          XCTAssertEqual(testee, expected)
   16.18      }
   16.19