Exemple #1
0
        public virtual ApiKeyAllocationResponseModel MapBOToModel(
            BOKeyAllocation boKeyAllocation)
        {
            var model = new ApiKeyAllocationResponseModel();

            model.SetProperties(boKeyAllocation.CollectionName, boKeyAllocation.Allocated);

            return(model);
        }
        public void MapResponseToRequest()
        {
            var mapper = new ApiKeyAllocationModelMapper();
            var model  = new ApiKeyAllocationResponseModel();

            model.SetProperties("A", 1);
            ApiKeyAllocationRequestModel response = mapper.MapResponseToRequest(model);

            response.Allocated.Should().Be(1);
        }