예제 #1
0
        public void MapBOToModel()
        {
            var           mapper = new BOLUnitMeasureMapper();
            BOUnitMeasure bo     = new BOUnitMeasure();

            bo.SetProperties("A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A");
            ApiUnitMeasureResponseModel response = mapper.MapBOToModel(bo);

            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Name.Should().Be("A");
            response.UnitMeasureCode.Should().Be("A");
        }
예제 #2
0
        public void MapBOToModelList()
        {
            var           mapper = new BOLUnitMeasureMapper();
            BOUnitMeasure bo     = new BOUnitMeasure();

            bo.SetProperties("A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A");
            List <ApiUnitMeasureResponseModel> response = mapper.MapBOToModel(new List <BOUnitMeasure>()
            {
                { bo }
            });

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