public void SetUp() { testDataHelper = new TestDataHelper(); var constituent = ConstituentMother.ConstituentWithName(ConstituentNameMother.JamesFranklin()); savedConstituent = testDataHelper.CreateConstituent(constituent); savedAddress = testDataHelper.CreateAddress(AddressMother.SanFrancisco(savedConstituent)); occupationRepository = new OccupationRepository(testDataHelper.session); savedOccupation = testDataHelper.CreateOccupation(OccupationMother.Doctor(savedConstituent, savedAddress)); }
public static OccupationData Doctor(Occupation occupation) { return new OccupationData { Type = new OccupationTypeData {Description = "Mobile", Id = 1}, OccupationName = occupation.OccupationName, Description = occupation.Description, Constituent = new LinkData {Id = occupation.Constituent.Id}, Address = new LinkData {Id = occupation.Address.Id} }; }