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

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

            response.Count.Should().Be(1);
        }
コード例 #2
0
        public void MapBOToModel()
        {
            var mapper = new BOLTransactionHistoryMapper();
            BOTransactionHistory bo = new BOTransactionHistory();

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

            response.ActualCost.Should().Be(1m);
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.ProductID.Should().Be(1);
            response.Quantity.Should().Be(1);
            response.ReferenceOrderID.Should().Be(1);
            response.ReferenceOrderLineID.Should().Be(1);
            response.TransactionDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.TransactionID.Should().Be(1);
            response.TransactionType.Should().Be("A");
        }