public void ReturnContactDetailsInResidentResponse() { var domain = new ResidentDomain { Id = 1234, FirstName = "Name", LastName = "Last", DateOfBirth = new DateTime(), Gender = GenderTypeEnum.F, Contacts = new List <ContactDetailsDomain> { new ContactDetailsDomain { Id = 1234, AddedBy = "Test" } } }; var expectedResponse = new ResidentResponse { Id = 1234, FirstName = "Name", LastName = "Last", DateOfBirth = new DateTime(), Gender = "F", ContactInformation = new List <ContactDetailsResponse> { new ContactDetailsResponse { Id = 1234, AddedBy = "Test" } } }; domain.ToResponse().Should().BeEquivalentTo(expectedResponse); }
public void CanMapResidentInformationFromDomainToResponse() { var domain = new ResidentDomain { Id = 1234, FirstName = "Name", LastName = "Last", DateOfBirth = new DateTime(), Gender = GenderTypeEnum.F, Contacts = null }; var expectedResponse = new ResidentResponse { Id = 1234, FirstName = "Name", LastName = "Last", DateOfBirth = new DateTime(), Gender = "F", ContactInformation = null }; domain.ToResponse().Should().BeEquivalentTo(expectedResponse); }