public void WhenINeedCompanyToHaveProperty(string companyName, PropertyType type, string propertyName) { context.For <Company>(companyName) .Exists(propertyName, company => company.CompanyProperty); context.For <CompanyProperty>(propertyName) .IsTrue(property => property.Type == type); }
public void WhenINeedEmployeeNameMentionedInCompanyProperty(string name) { var employee = context.Storage.Get <IHaveToken <Employee> >(); context.For(employee) .For <CompanyProperty>(name) .IsTrue((emp, property) => property.Name.Contains(emp.Name)); }
public void GivenIHaveSetUpAModelWithContainingOfItems(int branches, int items) { var watch = new Stopwatch(); models = ModelGenerator.GenerateModels(branches, items).ToList(); watch.Stop(); Debug.WriteLine("generate time " + watch.Elapsed); context.Exists("model", () => models); for (int i = 0; i < branches; i++) { var i1 = i; var token = context.For <Model>("model").Exists(model => model.Branches[i1]); context.For <Item>(token).IsTrue(x => x.Valid); } }
public void WhenINeedCompanyToHaveADepartment(string companyName, string departmentName) { context.For <Company>(companyName) .Exists(departmentName, company => company.Departments); }
public void GivenInsuranceIsCreatedInYear(string key, int year) { context.For <Insurance>(key) .IsTrue(insurance => insurance.Created.Year == year); }
public void WhenISpecifyThatProjectDependsOnDepartmentAndCompanyProperty(string projKey, string depKey, string propKey) { context.For <Department>(depKey) .For <CompanyProperty>(propKey) .Exists(projKey, (department, property) => department.Projects); }
public void GivenForInsuranceExistsATax(string insuranceKey, string taxKey) { context.For <Insurance>(insuranceKey) .Exists(taxKey, insurance => insurance.Taxes); }
public void GivenAssignmentHasAtLeastPeopleCovered(string key, int headCount) { context.For <Assignment>(key) .IsTrue(assignmen => assignmen.HeadCount >= headCount); }