public void MapModelToBO() { var mapper = new BOLKeyAllocationMapper(); ApiKeyAllocationRequestModel model = new ApiKeyAllocationRequestModel(); model.SetProperties(1); BOKeyAllocation response = mapper.MapModelToBO("A", model); response.Allocated.Should().Be(1); }
public void MapBOToModel() { var mapper = new BOLKeyAllocationMapper(); BOKeyAllocation bo = new BOKeyAllocation(); bo.SetProperties("A", 1); ApiKeyAllocationResponseModel response = mapper.MapBOToModel(bo); response.Allocated.Should().Be(1); response.CollectionName.Should().Be("A"); }
public void MapEFToBO() { var mapper = new DALKeyAllocationMapper(); KeyAllocation entity = new KeyAllocation(); entity.SetProperties(1, "A"); BOKeyAllocation response = mapper.MapEFToBO(entity); response.Allocated.Should().Be(1); response.CollectionName.Should().Be("A"); }
public void MapBOToEF() { var mapper = new DALKeyAllocationMapper(); var bo = new BOKeyAllocation(); bo.SetProperties("A", 1); KeyAllocation response = mapper.MapBOToEF(bo); response.Allocated.Should().Be(1); response.CollectionName.Should().Be("A"); }
public void MapBOToModelList() { var mapper = new BOLKeyAllocationMapper(); BOKeyAllocation bo = new BOKeyAllocation(); bo.SetProperties("A", 1); List <ApiKeyAllocationResponseModel> response = mapper.MapBOToModel(new List <BOKeyAllocation>() { { bo } }); response.Count.Should().Be(1); }