Beispiel #1
0
 public void SetUp()
 {
     _sut      = CreateSUT();
     _resolver = new Mock <IBusinessPartnerSpecificServiceResolver>();
     _resolver.Setup(r => r.GetBuildValueFactoryFor(It.IsAny <BusinessPartner>())).Returns(
         new FedExBuildValueFactory());
     _seg = new SegmentFactory(_resolver.Object);
     _seg.SetBuildValues(BusinessPartner.FedEx);
 }
Beispiel #2
0
        public void can_build_invoice_detail()
        {
            var segFactory = new SegmentFactory(new BusinessPartnerSpecificServiceResolver());

            segFactory.SetBuildValues(BusinessPartner.Initech);
            IDictionary <Qualifier, string> values = new Dictionary <Qualifier, string>
            {
                { Qualifier.InvoiceVendorPart, "FIN23432" },
                { Qualifier.PartDescription, "rectangular box" },
                { Qualifier.PONumber, "32543243" },
                { Qualifier.POLineNumber, "10" }
            };
            EDIXmlSegment seg = segFactory.GetLineItemInvoiceDetail("10",
                                                                    1, (decimal).99, values);

            Console.WriteLine(seg.Value);
        }