public void MapBOToModelList() { var mapper = new BOLTagSetMapper(); BOTagSet bo = new BOTagSet(); bo.SetProperties("A", BitConverter.GetBytes(1), "A", "A", 1); List <ApiTagSetResponseModel> response = mapper.MapBOToModel(new List <BOTagSet>() { { bo } }); response.Count.Should().Be(1); }
public void MapModelToBO() { var mapper = new BOLTagSetMapper(); ApiTagSetRequestModel model = new ApiTagSetRequestModel(); model.SetProperties(BitConverter.GetBytes(1), "A", "A", 1); BOTagSet response = mapper.MapModelToBO("A", model); response.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1)); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); response.SortOrder.Should().Be(1); }
public void MapBOToModel() { var mapper = new BOLTagSetMapper(); BOTagSet bo = new BOTagSet(); bo.SetProperties("A", BitConverter.GetBytes(1), "A", "A", 1); ApiTagSetResponseModel response = mapper.MapBOToModel(bo); response.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1)); response.Id.Should().Be("A"); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); response.SortOrder.Should().Be(1); }
public void MapEFToBO() { var mapper = new DALTagSetMapper(); TagSet entity = new TagSet(); entity.SetProperties(BitConverter.GetBytes(1), "A", "A", "A", 1); BOTagSet response = mapper.MapEFToBO(entity); response.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1)); response.Id.Should().Be("A"); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); response.SortOrder.Should().Be(1); }