From 706c9b9999fb6d5a010432840dfee55a681c80b6 Mon Sep 17 00:00:00 2001 From: Marek Stransky Date: Tue, 16 Jan 2024 09:51:30 +0100 Subject: [PATCH] Simplify test conditions --- .../NetworkingObjectsTests.swift | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/WultraMobileTokenSDKTests/NetworkingObjectsTests.swift b/WultraMobileTokenSDKTests/NetworkingObjectsTests.swift index 839cbac..f02018e 100644 --- a/WultraMobileTokenSDKTests/NetworkingObjectsTests.swift +++ b/WultraMobileTokenSDKTests/NetworkingObjectsTests.swift @@ -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.") } }