protected virtual IShiftRule GetShiftRuleInstance(ShiftRuleValue shiftRuleValue, RuleType type, ConstraintType constraintType)
        {
            IShiftRule ruleInstance = null;
            IAssessor assessor = null;
            ShiftRuleDefinition ruleDefinition;

            ruleDefinition = this.DataAccess.GetRuleDefinition(shiftRuleValue.rule_id);

            switch (shiftRuleValue.rule_id)
            {
                case 2:
                    assessor = new MaxShiftsPerEmployeeInWeekAssessor(shiftRuleValue);
                    ruleInstance = new MaxEmployeeShiftsPerWeekRule(ruleDefinition, shiftRuleValue, assessor, type);
                    break;
                case 4:
                    assessor = new MinShiftsPerEmployeeInWeekAssessor(shiftRuleValue);
                    ruleInstance = new MinEmployeeShiftsPerWeekRule(ruleDefinition, shiftRuleValue, assessor, type);
                    break;
                case 7:
                    assessor = new EmployeesInShiftAssessor(shiftRuleValue.value);
                    ruleInstance = new MinEmployeesPerShiftRule(ruleDefinition, shiftRuleValue, assessor, type);
                    break;
                default:
                    break;
            }

            if (ruleInstance != null)
                ruleInstance.Enabled = ruleInstance.IsRuleEnabled();

            return ruleInstance;
        }
        protected virtual ShiftRuleValue MockShiftRuleValue()
        {
            ShiftRuleValue shiftRuleValue = new ShiftRuleValue();

            shiftRuleValue.rule_id = 7;
            shiftRuleValue.value = 2;

            return shiftRuleValue;
        }
 //public IAssessor Assessor { get; private set; }
 public MinEmployeesPerShiftRule(ShiftRuleDefinition ruleDefinition,  ShiftRuleValue shiftRuleValue, IAssessor assessor,  RuleType type)
     : base(shiftRuleValue.rule_id, shiftRuleValue.employee_id, ruleDefinition.value, ruleDefinition.description, 
     assessor, type, ConstraintType.ShiftRuleValue, shiftRuleValue.value)
 {
     this.ShiftRuleValue = shiftRuleValue;
 }
        protected override void Establish_context()
        {
            base.Establish_context();

            _shift = new Shift();
            _shiftRuleDefinition = MockShiftRuleDefinition();
            _shiftRuleValue = MockShiftRuleValue();
            _assessor = new EmployeesInShiftAssessor(_shiftRuleValue.value);
            _shiftRule = new MinEmployeesPerShiftRule(_shiftRuleDefinition, _shiftRuleValue, _assessor, RuleType.HardRule);
            _shiftRule.Enabled = true;
        }