title: How to compare to optional model properties with XCTAssertEqual
body: <p>Is there a better way to compare the values in my model object, than the following snippet which seems very verbose and it's only for one property?</p>
  
  <p><strong>Model Object</strong></p>
  
  <pre><code>struct Address {
  
      static let kADDRESS1 = "address1"
      static let kADDRESS2 = "address2"
      static let kADDRESS3 = "address3"
      static let kCITY = "city"
      static let kSTATE = "state"
      static let kPOSTAL_CODE = "postalCode"
  
      var address1:String?,
      address2:String?,
      address3:String?,
      city:String?,
      state:String?,
      postalCode:String?
  
      init(address1: String?,
              address2: String?,
              address3: String?,
              city: String?,
              state: String?,
          postalCode: String?) {
              self.address1 = address1;
              self.address2 = address2;
              self.address3 = address3;
              self.city = city;
              self.state = state;
              self.postalCode = postalCode;
  
      }
      init(params:NSDictionary) {
          self.init(address1: params.objectForKey("address1") as String?,
              address2: params.objectForKey("address2") as String?,
              address3: params.objectForKey("address3") as String?,
              city: params.objectForKey("city") as String?,
              state: params.objectForKey("state") as String?,
              postalCode: params.objectForKey("state") as String?)
      }
  }
  </code></pre>
  
  <p><strong>From test case</strong>
     func testCreateAddress() {</p>
  
  <pre><code>let params:NSDictionary = [Address.kADDRESS1: "1 Main St.", Address.kADDRESS2: "Apt. 1", Address.kADDRESS3: "Box 1", Address.kCITY: "San Francisco", Address.kSTATE: "CA", Address.kPOSTAL_CODE: "7899"];
  
  let address = Address(params:params);
  
  if let param  = params[Address.kADDRESS1] as String? {
      if let property = address.address1 {
          XCTAssertEqual(property, param)
      }
      else {
          XCTFail("properties do not match")
      }
  }
  else {
      if let property = address.address1 {
          XCTFail("properties do not match")
      }
  }
  </code></pre>
  
  <p>}</p>