public void MapModelToBO() { var mapper = new BOLCommunityActionTemplateMapper(); ApiCommunityActionTemplateRequestModel model = new ApiCommunityActionTemplateRequestModel(); model.SetProperties(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), "A", "A"); BOCommunityActionTemplate response = mapper.MapModelToBO("A", model); response.ExternalId.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da")); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); }
public void MapBOToModelList() { var mapper = new BOLCommunityActionTemplateMapper(); BOCommunityActionTemplate bo = new BOCommunityActionTemplate(); bo.SetProperties("A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), "A", "A"); List <ApiCommunityActionTemplateResponseModel> response = mapper.MapBOToModel(new List <BOCommunityActionTemplate>() { { bo } }); response.Count.Should().Be(1); }
public void MapBOToModel() { var mapper = new BOLCommunityActionTemplateMapper(); BOCommunityActionTemplate bo = new BOCommunityActionTemplate(); bo.SetProperties("A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), "A", "A"); ApiCommunityActionTemplateResponseModel response = mapper.MapBOToModel(bo); response.ExternalId.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da")); response.Id.Should().Be("A"); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); }
public void MapEFToBO() { var mapper = new DALCommunityActionTemplateMapper(); CommunityActionTemplate entity = new CommunityActionTemplate(); entity.SetProperties(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), "A", "A", "A"); BOCommunityActionTemplate response = mapper.MapEFToBO(entity); response.ExternalId.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da")); response.Id.Should().Be("A"); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); }