@@ -496,7 +496,7 @@ - (void)testGetFeatureVariableBooleanWithTrue {
496496 NSString *expectedValueString = @" true" ;
497497 BOOL expectedValue = true ;
498498 id optimizelyMock = [self getOptimizelyMockForFeatureVariableType: featureVariableType variableKey: variableKeyTrue expectedReturn: expectedValueString];
499- XCTAssertEqual (expectedValue, [optimizelyMock getFeatureVariableBoolean: featureKey variableKey: variableKeyTrue userId: kUserId attributes: nil ],
499+ XCTAssertEqual (expectedValue, [[ optimizelyMock getFeatureVariableBoolean: featureKey variableKey: variableKeyTrue userId: kUserId attributes: nil ] boolValue ],
500500 @" should return %@ for feature variable value %@ " , expectedValue ? @" true" : @" false" , expectedValueString);
501501 OCMVerify ([optimizelyMock getFeatureVariableValueForType: featureVariableType
502502 featureKey: featureKey
@@ -515,7 +515,7 @@ - (void)testGetFeatureVariableBooleanWithFalse {
515515 NSString *expectedValueString = @" false" ;
516516 BOOL expectedValue = false ;
517517 id optimizelyMock = [self getOptimizelyMockForFeatureVariableType: featureVariableType variableKey: variableKeyFalse expectedReturn: expectedValueString];
518- XCTAssertEqual (expectedValue, [optimizelyMock getFeatureVariableBoolean: featureKey variableKey: variableKeyFalse userId: kUserId attributes: nil ],
518+ XCTAssertEqual (expectedValue, [[ optimizelyMock getFeatureVariableBoolean: featureKey variableKey: variableKeyFalse userId: kUserId attributes: nil ] boolValue ],
519519 @" should return %@ for feature variable value %@ " , expectedValue ? @" true" : @" false" , expectedValueString);
520520 OCMVerify ([optimizelyMock getFeatureVariableValueForType: featureVariableType
521521 featureKey: featureKey
@@ -534,7 +534,7 @@ - (void)testGetFeatureVariableBooleanWithInvalidBoolean {
534534 NSString *expectedValueString = @" nonBooleanValue" ;
535535 BOOL expectedValue = false ;
536536 id optimizelyMock = [self getOptimizelyMockForFeatureVariableType: featureVariableType variableKey: variableKeyNonBoolean expectedReturn: expectedValueString];
537- XCTAssertEqual (expectedValue, [optimizelyMock getFeatureVariableBoolean: featureKey variableKey: variableKeyNonBoolean userId: kUserId attributes: nil ],
537+ XCTAssertEqual (expectedValue, [[ optimizelyMock getFeatureVariableBoolean: featureKey variableKey: variableKeyNonBoolean userId: kUserId attributes: nil ] boolValue ],
538538 @" should return %@ for feature variable value %@ " , expectedValue ? @" true" : @" false" , expectedValueString);
539539 OCMVerify ([optimizelyMock getFeatureVariableValueForType: featureVariableType
540540 featureKey: featureKey
@@ -553,7 +553,7 @@ - (void)testGetFeatureVariableBooleanWithNil {
553553 NSString *expectedValueString = @" nonBooleanValue" ;
554554 BOOL expectedValue = false ;
555555 id optimizelyMock = [self getOptimizelyMockForFeatureVariableType: featureVariableType variableKey: variableKeyNull expectedReturn: expectedValueString];
556- XCTAssertEqual (expectedValue, [optimizelyMock getFeatureVariableBoolean: featureKey variableKey: variableKeyNull userId: kUserId attributes: nil ],
556+ XCTAssertEqual (expectedValue, [[ optimizelyMock getFeatureVariableBoolean: featureKey variableKey: variableKeyNull userId: kUserId attributes: nil ] boolValue ],
557557 @" should return %@ for feature variable value %@ " , expectedValue ? @" true" : @" false" , expectedValueString);
558558 OCMVerify ([optimizelyMock getFeatureVariableValueForType: featureVariableType
559559 featureKey: featureKey
@@ -572,7 +572,7 @@ - (void)testGetFeatureVariableDoubleWithDouble {
572572 NSString *expectedValueString = @" 100.54" ;
573573 double expectedValue = 100.54 ;
574574 id optimizelyMock = [self getOptimizelyMockForFeatureVariableType: featureVariableType variableKey: variableKeyDouble expectedReturn: expectedValueString];
575- XCTAssertEqual (expectedValue, [optimizelyMock getFeatureVariableDouble: featureKey variableKey: variableKeyDouble userId: kUserId attributes: nil ],
575+ XCTAssertEqual (expectedValue, [[ optimizelyMock getFeatureVariableDouble: featureKey variableKey: variableKeyDouble userId: kUserId attributes: nil ] doubleValue ],
576576 @" should return %f for feature variable value %@ " , expectedValue, expectedValueString);
577577 OCMVerify ([optimizelyMock getFeatureVariableValueForType: featureVariableType
578578 featureKey: featureKey
@@ -590,7 +590,7 @@ - (void)testGetFeatureVariableDoubleWithInt {
590590 NSString *expectedValueString = @" 100" ;
591591 double expectedValue = 100 ;
592592 id optimizelyMock = [self getOptimizelyMockForFeatureVariableType: featureVariableType variableKey: variableKeyInt expectedReturn: expectedValueString];
593- XCTAssertEqual (expectedValue, [optimizelyMock getFeatureVariableDouble: featureKey variableKey: variableKeyInt userId: kUserId attributes: nil ],
593+ XCTAssertEqual (expectedValue, [[ optimizelyMock getFeatureVariableDouble: featureKey variableKey: variableKeyInt userId: kUserId attributes: nil ] doubleValue ],
594594 @" should return %f for feature variable value %@ " , expectedValue, expectedValueString);
595595 OCMVerify ([optimizelyMock getFeatureVariableValueForType: featureVariableType
596596 featureKey: featureKey
@@ -608,8 +608,8 @@ - (void)testGetFeatureVariableDoubleWithInvalidDouble {
608608 NSString *expectedValueString = @" nonDoubleValue" ;
609609 double expectedValue = 0.0 ;
610610 id optimizelyMock = [self getOptimizelyMockForFeatureVariableType: featureVariableType variableKey: variableKeyNonDouble expectedReturn: expectedValueString];
611- XCTAssertEqual (expectedValue, [optimizelyMock getFeatureVariableDouble: featureKey variableKey: variableKeyNonDouble userId: kUserId attributes: nil ],
612- @" should return %f for feature variable value %@ " , expectedValue , expectedValueString);
611+ XCTAssertEqual (expectedValue, [[ optimizelyMock getFeatureVariableDouble: featureKey variableKey: variableKeyNonDouble userId: kUserId attributes: nil ] doubleValue ],
612+ @" should return nil for feature variable value %@ " , expectedValueString);
613613 OCMVerify ([optimizelyMock getFeatureVariableValueForType: featureVariableType
614614 featureKey: featureKey
615615 variableKey: variableKeyNonDouble
@@ -624,10 +624,10 @@ - (void)testGetFeatureVariableDoubleWithNil {
624624 NSString *featureVariableType = FeatureVariableTypeDouble;
625625
626626 NSString *expectedValueString = nil ;
627- double expectedValue = 0.0 ;
627+ NSNumber * expectedValue = nil ;
628628 id optimizelyMock = [self getOptimizelyMockForFeatureVariableType: featureVariableType variableKey: variableKeyNull expectedReturn: expectedValueString];
629629 XCTAssertEqual (expectedValue, [optimizelyMock getFeatureVariableDouble: featureKey variableKey: variableKeyNull userId: kUserId attributes: nil ],
630- @" should return %f for feature variable value %@ " , expectedValue , expectedValueString);
630+ @" should return nil for feature variable value %@ " , expectedValueString);
631631 OCMVerify ([optimizelyMock getFeatureVariableValueForType: featureVariableType
632632 featureKey: featureKey
633633 variableKey: variableKeyNull
@@ -645,7 +645,7 @@ - (void)testGetFeatureVariableIntegerWithInt {
645645 NSString *expectedValueString = @" 100" ;
646646 int expectedValue = 100 ;
647647 id optimizelyMock = [self getOptimizelyMockForFeatureVariableType: featureVariableType variableKey: variableKeyInt expectedReturn: expectedValueString];
648- XCTAssertEqual (expectedValue, [optimizelyMock getFeatureVariableInteger: featureKey variableKey: variableKeyInt userId: kUserId attributes: nil ],
648+ XCTAssertEqual (expectedValue, [[ optimizelyMock getFeatureVariableInteger: featureKey variableKey: variableKeyInt userId: kUserId attributes: nil ] integerValue ],
649649 @" should return %d for feature variable value %@ " , expectedValue, expectedValueString);
650650 OCMVerify ([optimizelyMock getFeatureVariableValueForType: featureVariableType
651651 featureKey: featureKey
@@ -664,7 +664,7 @@ - (void)testGetFeatureVariableIntegerWithDouble {
664664 NSString *expectedValueString = @" 100.45" ;
665665 int expectedValue = 100 ;
666666 id optimizelyMock = [self getOptimizelyMockForFeatureVariableType: featureVariableType variableKey: variableKeyDouble expectedReturn: expectedValueString];
667- XCTAssertEqual (expectedValue, [optimizelyMock getFeatureVariableInteger: featureKey variableKey: variableKeyDouble userId: kUserId attributes: nil ],
667+ XCTAssertEqual (expectedValue, [[ optimizelyMock getFeatureVariableInteger: featureKey variableKey: variableKeyDouble userId: kUserId attributes: nil ] integerValue ],
668668 @" should return %d for feature variable value %@ " , expectedValue, expectedValueString);
669669 OCMVerify ([optimizelyMock getFeatureVariableValueForType: featureVariableType
670670 featureKey: featureKey
@@ -683,7 +683,7 @@ - (void)testGetFeatureVariableIntegerWithInvalidDouble {
683683 NSString *expectedValueString = @" nonIntegerValue" ;
684684 int expectedValue = 0 ;
685685 id optimizelyMock = [self getOptimizelyMockForFeatureVariableType: featureVariableType variableKey: variableNonInt expectedReturn: expectedValueString];
686- XCTAssertEqual (expectedValue, [optimizelyMock getFeatureVariableInteger: featureKey variableKey: variableNonInt userId: kUserId attributes: nil ],
686+ XCTAssertEqual (expectedValue, [[ optimizelyMock getFeatureVariableInteger: featureKey variableKey: variableNonInt userId: kUserId attributes: nil ] integerValue ],
687687 @" should return %d for feature variable value %@ " , expectedValue, expectedValueString);
688688 OCMVerify ([optimizelyMock getFeatureVariableValueForType: featureVariableType
689689 featureKey: featureKey
@@ -702,7 +702,7 @@ - (void)testGetFeatureVariableIntegerWithNil {
702702 NSString *expectedValueString = nil ;
703703 int expectedValue = 0 ;
704704 id optimizelyMock = [self getOptimizelyMockForFeatureVariableType: featureVariableType variableKey: variableKeyNull expectedReturn: expectedValueString];
705- XCTAssertEqual (expectedValue, [optimizelyMock getFeatureVariableInteger: featureKey variableKey: variableKeyNull userId: kUserId attributes: nil ],
705+ XCTAssertEqual (expectedValue, [[ optimizelyMock getFeatureVariableInteger: featureKey variableKey: variableKeyNull userId: kUserId attributes: nil ] integerValue ],
706706 @" should return %d for feature variable value %@ " , expectedValue, expectedValueString);
707707 OCMVerify ([optimizelyMock getFeatureVariableValueForType: featureVariableType
708708 featureKey: featureKey
0 commit comments