public void MapModelToBO() { var mapper = new BOLLifecycleMapper(); ApiLifecycleRequestModel model = new ApiLifecycleRequestModel(); model.SetProperties(BitConverter.GetBytes(1), "A", "A"); BOLifecycle response = mapper.MapModelToBO("A", model); response.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1)); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); }
public void MapBOToModelList() { var mapper = new BOLLifecycleMapper(); BOLifecycle bo = new BOLifecycle(); bo.SetProperties("A", BitConverter.GetBytes(1), "A", "A"); List <ApiLifecycleResponseModel> response = mapper.MapBOToModel(new List <BOLifecycle>() { { bo } }); response.Count.Should().Be(1); }
public void MapBOToModel() { var mapper = new BOLLifecycleMapper(); BOLifecycle bo = new BOLifecycle(); bo.SetProperties("A", BitConverter.GetBytes(1), "A", "A"); ApiLifecycleResponseModel 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"); }
public void MapEFToBO() { var mapper = new DALLifecycleMapper(); Lifecycle entity = new Lifecycle(); entity.SetProperties(BitConverter.GetBytes(1), "A", "A", "A"); BOLifecycle 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"); }