public void MapModelToBO() { var mapper = new BOLUserRoleMapper(); ApiUserRoleRequestModel model = new ApiUserRoleRequestModel(); model.SetProperties("A", "A"); BOUserRole response = mapper.MapModelToBO("A", model); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); }
public void MapBOToModel() { var mapper = new BOLUserRoleMapper(); BOUserRole bo = new BOUserRole(); bo.SetProperties("A", "A", "A"); ApiUserRoleResponseModel response = mapper.MapBOToModel(bo); response.Id.Should().Be("A"); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); }
public void MapBOToModelList() { var mapper = new BOLUserRoleMapper(); BOUserRole bo = new BOUserRole(); bo.SetProperties("A", "A", "A"); List <ApiUserRoleResponseModel> response = mapper.MapBOToModel(new List <BOUserRole>() { { bo } }); response.Count.Should().Be(1); }