コード例 #1
0
        public void InvalidTypeCast()
        {
            CreateConditions(Operator.EQ);

            var attributes = new[]
            {
                UnlaunchAttribute.NewBoolean(AttributeKey, true)
            };

            Assert.Throws <InvalidCastException>(() => OffVariationTargetingRulesNotMatch(attributes));
        }
コード例 #2
0
        public void InvalidType()
        {
            CreateConditions(Operator.SW);

            var attributes = new[]
            {
                UnlaunchAttribute.NewBoolean(AttributeKey, true)
            };

            OffVariationTargetingRulesNotMatch(attributes);
        }
コード例 #3
0
        public void Boolean()
        {
            CreateNotEqualsCondition(AttributeType.Boolean, "false");

            var attributes = new[]
            {
                UnlaunchAttribute.NewBoolean(AttributeKey, true)
            };

            OnVariationTargetingRulesMatch(attributes);
        }
コード例 #4
0
        public void InvalidAttributeKey()
        {
            var flag = FlagResponse.data.flags.First();

            flag.rules.First().conditions = new[] { new TargetRuleConditionDto
                                                    {
                                                        id        = 119,
                                                        attribute = AttributeKey,
                                                        type      = AttributeType.Boolean,
                                                        op        = Operator.EQ,
                                                        value     = "True"
                                                    } };

            LoadFeatureFlags();

            var attributes = new[]
            {
                UnlaunchAttribute.NewBoolean("wrongKey", true)
            };

            OffVariationTargetingRulesNotMatch(attributes);
        }