Skip to content

Commit

Permalink
Simplify test conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
Hopsaheysa committed Jan 16, 2024
1 parent 11a06ed commit 706c9b9
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions WultraMobileTokenSDKTests/NetworkingObjectsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -384,15 +384,8 @@ class NetworkingObjectsTests: XCTestCase {
return
}

XCTAssertFalse(attributes.count == 0, "There should be a Conversion Attribute, but attributes are empty.")
XCTAssertFalse(attributes.count > 1, "There should be only a Conversion Attribute, so the amount attribute deserialization changed so also this test should change")

if let conversion = attributes.first as? WMTOperationAttributeAmountConversion {
XCTAssertEqual(conversion.type, .amountConversion, "The First attribute should be a Conversion Attribute.")
} else {
XCTFail("Failed to cast to WMTOperationAttributeAmountConversion")
}

XCTAssertTrue(attributes.count == 1, "There should be one Conversion Attribute but the count is: \(attributes.count)")
XCTAssert(attributes.first is WMTOperationAttributeAmountConversion, "The First attribute should be a Conversion Attribute.")
}
}

Expand Down

0 comments on commit 706c9b9

Please sign in to comment.