예제 #1
0
        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);
        }
예제 #2
0
        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");
        }
예제 #3
0
        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);
        }