@@ -33,18 +33,25 @@ public IEnumerable<RuleSpecification> GetRulesSpecifications()
3333 RuleAddPriorityOption . ByPriorityNumber ( i ) ,
3434 rulesSpecifications ) ;
3535 }
36+
37+ var deactiveDateBegin = CreateRandomDateBegin ( currentYear ) ;
38+
39+ Add ( CreateMultipleRule ( ( ContentTypes ) contentType , finalNumber , deactiveDateBegin , CreateRandomDateEnd ( deactiveDateBegin ) , isActive : false ) ,
40+ RuleAddPriorityOption . ByPriorityNumber ( finalNumber ) ,
41+ rulesSpecifications ) ;
3642 }
3743
3844 return rulesSpecifications ;
3945 }
4046
4147 private static RuleBuilderResult < ContentTypes , ConditionTypes > CreateMultipleRule ( ContentTypes contentTypes , int value , DateTime dateBegin ,
42- DateTime ? dateEnd ) =>
48+ DateTime ? dateEnd , bool isActive = true ) =>
4349 RuleBuilder
4450 . NewRule < ContentTypes , ConditionTypes > ( )
4551 . WithName ( $ "Multi rule for test { contentTypes } { value } ")
4652 . WithContent ( contentTypes , new { Value = value } )
4753 . WithDatesInterval ( dateBegin , dateEnd )
54+ . WithActive ( isActive )
4855 . WithCondition ( cnb => cnb . AsComposed ( )
4956 . WithLogicalOperator ( LogicalOperators . Or )
5057 . AddCondition ( condition => condition
@@ -53,9 +60,9 @@ private static RuleBuilderResult<ContentTypes, ConditionTypes> CreateMultipleRul
5360 . SetOperand ( 7 )
5461 . Build ( ) )
5562 . AddCondition ( condition => condition
56- . AsValued ( ConditionTypes . SumAll ) . OfDataType < int > ( )
57- . WithComparisonOperator ( Operators . Equal )
58- . SetOperand ( 9 )
63+ . AsValued ( ConditionTypes . SumAll ) . OfDataType < IEnumerable < int > > ( )
64+ . WithComparisonOperator ( Operators . In )
65+ . SetOperand ( new int [ ] { 9 , 8 , 6 } )
5966 . Build ( ) )
6067 . AddCondition ( condition => condition . AsComposed ( )
6168 . WithLogicalOperator ( LogicalOperators . And )
@@ -127,4 +134,4 @@ private DateTime CreateRandomDateBegin(int year)
127134 return dateBegin . AddMonths ( months ) . AddDays ( 1 ) ;
128135 }
129136 }
130- }
137+ }
0 commit comments