title: Test Driven Upload method?
body: <p>I'm in a situation where I'm trying to use Test Driven Development.
  I've got no experienced in Swift, Xcode, Apple, IOS, TDD or even the macbook I'm using for development. Basically I'm a .Net Developer in a very unfamiliar situation. </p>
  
  <p>My current problem arrises from my ignorance on how to make a unit test that test a void method.</p>
  
  <p>I'm trying to make a method that sends a Image to a server.</p>
  
  <p>But my issue here is that I do not know how to test a method that doesn't return a value.</p>
  
  <p>I imagine that my method is going to be something similar to this:</p>
  
  <pre><code>public func Upload(_ image: UIImage)
  </code></pre>
  
  <p>and I imagine that I'll need to implement some version of <code>URLSession</code> that eventually will have to call a <code>resume()</code> method. but how do I test if this method is doing what it's supposed to be doing without invoking the network ? and after that how do I make an integration test where I can see that the expected result is in fact a file uploaded to the server ?
  Currently the server will be on the computer I'm developing on but the actual software will run from a testIphone that I've been issued.</p>
  
  <p>I've been searching online for days now and the best I've come across  have been this link <a href="http://swiftdeveloperblog.com/image-upload-with-progress-bar-example-in-swift/" rel="nofollow noreferrer">http://swiftdeveloperblog.com/image-upload-with-progress-bar-example-in-swift/</a>
  But it only approaches bits and pieces I imagine will be part of the solution not the testing of said solution. </p>
  
  <p>I think it's important to add I'm very much against creating to much complexity for testing purposes. testing should be simple and straight forward.</p>