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); }
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)); }