Exemplo n.º 1
0
        public void MapBOToModelList()
        {
            var      mapper = new BOLVendorMapper();
            BOVendor bo     = new BOVendor();

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

            response.Count.Should().Be(1);
        }
Exemplo n.º 2
0
        public void MapBOToModel()
        {
            var      mapper = new BOLVendorMapper();
            BOVendor bo     = new BOVendor();

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

            response.AccountNumber.Should().Be("A");
            response.ActiveFlag.Should().Be(true);
            response.BusinessEntityID.Should().Be(1);
            response.CreditRating.Should().Be(1);
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Name.Should().Be("A");
            response.PreferredVendorStatu.Should().Be(true);
            response.PurchasingWebServiceURL.Should().Be("A");
        }