@@ -55,16 +55,14 @@ import XCTest
55
55
func testStrongTypingViaSubscriptApi( ) async throws {
56
56
let status = try await config. fetchAndActivate ( )
57
57
XCTAssertEqual ( status, . successFetchedFromRemote)
58
- XCTAssertEqual ( config [ stringValue: Constants . stringKey] , Constants . stringValue)
59
- XCTAssertEqual ( config [ intValue: Constants . intKey] , Constants . intValue)
60
- XCTAssertEqual ( config [ numberValue: Constants . intKey] ,
61
- NSNumber ( integerLiteral: Constants . intValue) )
62
- XCTAssertEqual ( config [ floatValue: Constants . floatKey] , Constants . floatValue)
63
- XCTAssertEqual ( config [ doubleValue: Constants . floatKey] , Constants . doubleValue)
64
- XCTAssertEqual ( config [ boolValue: Constants . trueKey] , true )
65
- XCTAssertEqual ( config [ boolValue: Constants . falseKey] , false )
66
- XCTAssertEqual (
67
- config [ dataValue: Constants . stringKey] ,
58
+ XCTAssertEqual ( config [ decodedValue: Constants . stringKey] , Constants . stringValue)
59
+ XCTAssertEqual ( config [ decodedValue: Constants . intKey] , Constants . intValue)
60
+ XCTAssertEqual ( config [ decodedValue: Constants . floatKey] , Constants . floatValue)
61
+ XCTAssertEqual ( config [ decodedValue: Constants . floatKey] , Constants . doubleValue)
62
+ XCTAssertEqual ( config [ decodedValue: Constants . trueKey] , true )
63
+ XCTAssertEqual ( config [ decodedValue: Constants . falseKey] , false )
64
+ XCTAssertEqual (
65
+ config [ decodedValue: Constants . stringKey] ,
68
66
Constants . stringValue. data ( using: . utf8)
69
67
)
70
68
XCTAssertEqual ( try XCTUnwrap ( config [ jsonValue: Constants . jsonKey] ) , Constants . jsonValue)
@@ -174,7 +172,7 @@ import XCTest
174
172
}
175
173
176
174
func testStringFails( ) {
177
- XCTAssertEqual ( config [ stringValue : " UndefinedKey " ] , " " )
175
+ XCTAssertEqual ( config [ decodedValue : " UndefinedKey " ] , " " )
178
176
}
179
177
180
178
func testJSONFails( ) {
0 commit comments