public ConsultantsController(IDb db) { projects = new Projects(db.One); //Create some data if not existing... var per = new ConsultantsAgent().TheOneWithFullName("Per Persson"); var p = projects.ForConsultant(per.Id).ToList(); if (p.Count == 0) { var customers = new CustomersAgent(); var finnair = customers.TheOneWithName("Finnair"); var project = new Project(finnair, "Finnair's new app"); project.AddConsultant(per); projects.Save(project); var stina = new ConsultantsAgent().TheOneWithFullName("Stina Johansson"); var bruce = new ConsultantsAgent().TheOneWithFullName("Bruce Wayne"); project = new Project(finnair, "Yet another app"); project.AddConsultant(per); project.AddConsultant(stina); project.AddConsultant(bruce); projects.Save(project); } }
public When_saving_a_project() { var finnair = new CustomersAgent().TheOneWithName("Finnair"); project = new Project(finnair, randomName); project.AddActivity("X"); projects.Save(project); }