Пример #1
0
        public void MapBOToModelList()
        {
            var           mapper = new BOLSalesReasonMapper();
            BOSalesReason bo     = new BOSalesReason();

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

            response.Count.Should().Be(1);
        }
Пример #2
0
        public void MapBOToModel()
        {
            var           mapper = new BOLSalesReasonMapper();
            BOSalesReason bo     = new BOSalesReason();

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

            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Name.Should().Be("A");
            response.ReasonType.Should().Be("A");
            response.SalesReasonID.Should().Be(1);
        }