コード例 #1
0
        public void MapBOToModelList()
        {
            var            mapper = new BOLProductModelMapper();
            BOProductModel bo     = new BOProductModel();

            bo.SetProperties(1, "A", "A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            List <ApiProductModelResponseModel> response = mapper.MapBOToModel(new List <BOProductModel>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
コード例 #2
0
        public void MapModelToBO()
        {
            var mapper = new BOLProductModelMapper();
            ApiProductModelRequestModel model = new ApiProductModelRequestModel();

            model.SetProperties("A", "A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            BOProductModel response = mapper.MapModelToBO(1, model);

            response.CatalogDescription.Should().Be("A");
            response.Instruction.Should().Be("A");
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Name.Should().Be("A");
            response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
        }
コード例 #3
0
        public void MapBOToModel()
        {
            var            mapper = new BOLProductModelMapper();
            BOProductModel bo     = new BOProductModel();

            bo.SetProperties(1, "A", "A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            ApiProductModelResponseModel response = mapper.MapBOToModel(bo);

            response.CatalogDescription.Should().Be("A");
            response.Instruction.Should().Be("A");
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Name.Should().Be("A");
            response.ProductModelID.Should().Be(1);
            response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
        }