public void MapEntityToModelList() { var mapper = new DALEmployeeMapper(); Employee item = new Employee(); item.SetProperties(1, "A", true, true, "A"); List <ApiEmployeeServerResponseModel> response = mapper.MapEntityToModel(new List <Employee>() { { item } }); response.Count.Should().Be(1); }
public void MapModelToEntity() { var mapper = new DALEmployeeMapper(); ApiEmployeeServerRequestModel model = new ApiEmployeeServerRequestModel(); model.SetProperties("A", true, true, "A"); Employee response = mapper.MapModelToEntity(1, model); response.FirstName.Should().Be("A"); response.IsSalesPerson.Should().Be(true); response.IsShipper.Should().Be(true); response.LastName.Should().Be("A"); }
public void MapEntityToModel() { var mapper = new DALEmployeeMapper(); Employee item = new Employee(); item.SetProperties(1, "A", true, true, "A"); ApiEmployeeServerResponseModel response = mapper.MapEntityToModel(item); response.FirstName.Should().Be("A"); response.Id.Should().Be(1); response.IsSalesPerson.Should().Be(true); response.IsShipper.Should().Be(true); response.LastName.Should().Be("A"); }