Machx / MockNetworking

Apply URLProtocol to XCTests for Mock Networking API's

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

URLResponse custom isEqual func for or custom XCTAssert for unit tests

Machx opened this issue · comments

URLResponse considers fields that MockNetworking doesn't care about such as mime type in the equality comparison. For unit test purposes only a better equality method/assertion should be made using 1 of 2 methods

  1. Make a XCTAsser func that works better for URLResponse
  2. Make a better (for unit tests) equal func for comparison of 2 responses

fixed in multiple commits, but mainly this one 33fe34d