/// <summary> /// Aggregate root entity. /// </summary> /// <param name="pCodeAreaSpec"></param> /// <param name="pCodeFormatSpec"></param> /// <param name="customerSupportFactory"></param> /// <Remarks>could use Lazy<> if any of these dependancies are expensive to load.</Remarks> /// <remarks>note we are pretending pCodeAreaSpec is expensive to load up here</remarks> public Customer([Named("PostCodeAreaSpecRequiredAttribute")] ISpecification<string> pCodeAreaSpec, [Named("PostCodeFormatSpecRequiredAttribute")] ISpecification<string> pCodeFormatSpec, ICustomerChildEntityFactory customerSupportFactory) { // note could have passed in and array of spec as well. this.postCodeAreaSpec = pCodeAreaSpec; this.postCodeFormatSpec = pCodeFormatSpec; this.childEntityFactory = customerSupportFactory; this.addresses = new List<Address>(); }
public override void UnderTheseConditions() { postCodeAreaSpec = MockRepository.GenerateMock<PostCodeAreaSpecification>(); postCodeFormatSpec = MockRepository.GenerateMock<PostCodeFormatSpecification>(); childEntityFactory = MockRepository.GenerateMock<ICustomerChildEntityFactory>(); testStatus = PolicyStatuses.ApplicationPending; testComment = "testComment"; testName = "bob"; testCustId = 999; }