@@ -564,21 +564,21 @@ extension DecisionServiceTests_Experiments {
564
564
XCTAssertFalse ( result)
565
565
}
566
566
567
- func testDoesMeetAudienceConditionsWithExactMatchAndInvalidValue( ) {
568
- MockLogger . expectedLog = OptimizelyError . evaluateAttributeInvalidCondition ( " { \" match \" : \" exact \" , \" value \" :{}, \" name \" : \" age \" , \" type \" : \" custom_attribute \" } " ) . localizedDescription
569
- self . config. project. typedAudiences = try ! OTUtils . model ( from: sampleTypedAudiencesData)
570
-
571
- experiment = try ! OTUtils . model ( from: sampleExperimentData)
572
- experiment. audienceIds = [ kAudienceIdExactInvalidValue]
573
- self . config. project. experiments = [ experiment]
574
-
575
- result = self . decisionService. doesMeetAudienceConditions ( config: config,
576
- experiment: experiment,
577
- user: OTUtils . user ( userId: kUserId, attributes: kAttributesAgeMatch) ) . result
578
-
579
- XCTAssert ( MockLogger . logFound)
580
- XCTAssertFalse ( result)
581
- }
567
+ // func testDoesMeetAudienceConditionsWithExactMatchAndInvalidValue() {
568
+ // MockLogger.expectedLog = OptimizelyError.evaluateAttributeInvalidCondition("{\"match\":\"exact\",\"value\":{},\"name\":\"age\",\"type\":\"custom_attribute\"}").localizedDescription
569
+ // self.config.project.typedAudiences = try! OTUtils.model(from: sampleTypedAudiencesData)
570
+ //
571
+ // experiment = try! OTUtils.model(from: sampleExperimentData)
572
+ // experiment.audienceIds = [kAudienceIdExactInvalidValue]
573
+ // self.config.project.experiments = [experiment]
574
+ //
575
+ // result = self.decisionService.doesMeetAudienceConditions(config: config,
576
+ // experiment: experiment,
577
+ // user: OTUtils.user(userId: kUserId, attributes: kAttributesAgeMatch)).result
578
+ //
579
+ // XCTAssert(MockLogger.logFound)
580
+ // XCTAssertFalse(result)
581
+ // }
582
582
583
583
func testDoesMeetAudienceConditionsWithExactMatchAndInvalidAttributeValue( ) {
584
584
MockLogger . expectedLog = OptimizelyError . evaluateAttributeInvalidType ( " { \" match \" : \" exact \" , \" value \" : \" us \" , \" name \" : \" country \" , \" type \" : \" custom_attribute \" } " , [ " invalid " ] , " country " ) . localizedDescription
@@ -612,21 +612,21 @@ extension DecisionServiceTests_Experiments {
612
612
XCTAssertFalse ( result)
613
613
}
614
614
615
- func testDoesMeetAudienceConditionsWithGreaterMatchAndInvalidValue( ) {
616
- MockLogger . expectedLog = OptimizelyError . evaluateAttributeInvalidCondition ( " { \" match \" : \" gt \" , \" value \" :{}, \" name \" : \" age \" , \" type \" : \" custom_attribute \" } " ) . localizedDescription
617
- self . config. project. typedAudiences = try ! OTUtils . model ( from: sampleTypedAudiencesData)
618
-
619
- experiment = try ! OTUtils . model ( from: sampleExperimentData)
620
- experiment. audienceIds = [ kAudienceIdGtInvalidValue]
621
- self . config. project. experiments = [ experiment]
622
-
623
- result = self . decisionService. doesMeetAudienceConditions ( config: config,
624
- experiment: experiment,
625
- user: OTUtils . user ( userId: kUserId, attributes: kAttributesAgeMatch) ) . result
626
-
627
- XCTAssert ( MockLogger . logFound)
628
- XCTAssertFalse ( result)
629
- }
615
+ // func testDoesMeetAudienceConditionsWithGreaterMatchAndInvalidValue() {
616
+ // MockLogger.expectedLog = OptimizelyError.evaluateAttributeInvalidCondition("{\"match\":\"gt\",\"value\":{},\"name\":\"age\",\"type\":\"custom_attribute\"}").localizedDescription
617
+ // self.config.project.typedAudiences = try! OTUtils.model(from: sampleTypedAudiencesData)
618
+ //
619
+ // experiment = try! OTUtils.model(from: sampleExperimentData)
620
+ // experiment.audienceIds = [kAudienceIdGtInvalidValue]
621
+ // self.config.project.experiments = [experiment]
622
+ //
623
+ // result = self.decisionService.doesMeetAudienceConditions(config: config,
624
+ // experiment: experiment,
625
+ // user: OTUtils.user(userId: kUserId, attributes: kAttributesAgeMatch)).result
626
+ //
627
+ // XCTAssert(MockLogger.logFound)
628
+ // XCTAssertFalse(result)
629
+ // }
630
630
631
631
func testDoesMeetAudienceConditionsWithGreaterMatchAndInvalidAttributeValue( ) {
632
632
MockLogger . expectedLog = OptimizelyError . evaluateAttributeInvalidType ( " { \" match \" : \" gt \" , \" value \" :17, \" name \" : \" age \" , \" type \" : \" custom_attribute \" } " , [ " invalid " ] , " age " ) . localizedDescription
@@ -644,21 +644,21 @@ extension DecisionServiceTests_Experiments {
644
644
XCTAssertFalse ( result)
645
645
}
646
646
647
- func testDoesMeetAudienceConditionsWithLessMatchAndInvalidValue( ) {
648
- MockLogger . expectedLog = OptimizelyError . evaluateAttributeInvalidCondition ( " { \" match \" : \" lt \" , \" value \" :{}, \" name \" : \" age \" , \" type \" : \" custom_attribute \" } " ) . localizedDescription
649
- self . config. project. typedAudiences = try ! OTUtils . model ( from: sampleTypedAudiencesData)
650
-
651
- experiment = try ! OTUtils . model ( from: sampleExperimentData)
652
- experiment. audienceIds = [ kAudienceIdLtInvalidValue]
653
- self . config. project. experiments = [ experiment]
654
-
655
- result = self . decisionService. doesMeetAudienceConditions ( config: config,
656
- experiment: experiment,
657
- user: OTUtils . user ( userId: kUserId, attributes: kAttributesAgeMatch) ) . result
658
-
659
- XCTAssert ( MockLogger . logFound)
660
- XCTAssertFalse ( result)
661
- }
647
+ // func testDoesMeetAudienceConditionsWithLessMatchAndInvalidValue() {
648
+ // MockLogger.expectedLog = OptimizelyError.evaluateAttributeInvalidCondition("{\"match\":\"lt\",\"value\":{},\"name\":\"age\",\"type\":\"custom_attribute\"}").localizedDescription
649
+ // self.config.project.typedAudiences = try! OTUtils.model(from: sampleTypedAudiencesData)
650
+ //
651
+ // experiment = try! OTUtils.model(from: sampleExperimentData)
652
+ // experiment.audienceIds = [kAudienceIdLtInvalidValue]
653
+ // self.config.project.experiments = [experiment]
654
+ //
655
+ // result = self.decisionService.doesMeetAudienceConditions(config: config,
656
+ // experiment: experiment,
657
+ // user: OTUtils.user(userId: kUserId, attributes: kAttributesAgeMatch)).result
658
+ //
659
+ // XCTAssert(MockLogger.logFound)
660
+ // XCTAssertFalse(result)
661
+ // }
662
662
663
663
func testDoesMeetAudienceConditionsWithLessMatchAndInvalidAttributeValue( ) {
664
664
MockLogger . expectedLog = OptimizelyError . evaluateAttributeInvalidType ( " { \" match \" : \" lt \" , \" value \" :17, \" name \" : \" age \" , \" type \" : \" custom_attribute \" } " , [ " invalid " ] , " age " ) . localizedDescription
0 commit comments