示例#1
0
        public void GivenInsuranseMatchesHiLevelORCondition(string key)
        {
            var token = context.GetToken <Insurance>(key);

            context.Either(x => x.InsuranceHasFederalTax(token),
                           x => x.InsuranceHasMaximumDependents(token),
                           x => x.InsuranceHasDependentAssignment(token));
        }
示例#2
0
        public void WhenINeedDepartmentToEitherBeTypeOrHaveEmployeeOrHaveProjectWithBudjetOrMore(string departmentName,
                                                                                                 DepartmentType departmentType,
                                                                                                 EmploymentType employeeType,
                                                                                                 int amount)
        {
            IHaveToken <Employee> employee = null;
            var department = context.GetToken <Department>(departmentName);

            context.Either(x => x.DepartmentHasType(department, departmentType),
                           x => employee = x.DepartmentHasEmployeeOfType(department, employeeType),
                           x => x.DepartmentHasProjectWithBudget(department, amount));
            context.Storage.Set(employee);
        }
示例#3
0
 public void GivenThereIsNoSuitableTax(string key)
 {
     context.Inversion.InvertCollectionValidity(context.GetToken <Tax>(key));
 }
示例#4
0
 public void GivenThereIsNoSuitableAssignment(string key)
 {
     context.Inversion.InvertCollectionValidity <Assignment>(context.GetToken <Assignment>(key));
 }