public void can_get_different_build_values() { _resolver.GetSegmentFactoryFor(BusinessPartner.Initech); var segFactory = _resolver.GetSegmentFactoryFor(BusinessPartner.VandalayIndustries); var flexBuildValues = segFactory.BuildValues; segFactory = _resolver.GetSegmentFactoryFor(BusinessPartner.Initech); var InitechBuildValues = segFactory.BuildValues; InitechBuildValues.SegmentDelimiter.ShouldNotEqual(flexBuildValues.SegmentDelimiter); }
public Initech810Creator(IControlNumberRepository repo, IIncomingDocumentsRepository docsRepo, IBusinessPartnerSpecificServiceResolver serviceResolver) { _repo = repo; _docsRepo = docsRepo; _segmentFactory = serviceResolver.GetSegmentFactoryFor(BusinessPartner.Initech); _buildValues = _segmentFactory.BuildValues; }
public void can_add_levels() { var hll = HierarchicalLevelLoopWrapper.BuildWrapper("O", _resolver.GetSegmentFactoryFor(BusinessPartner.VandalayIndustries), false); var child = hll.AddLevel("I"); var grandchild = hll.AddLevel("X", child); var grandchild2 = hll.AddLevel("X", child); hll.GetId().ShouldEqual("1"); hll.GetParent().ShouldEqual(""); child.GetId().ShouldEqual("2"); child.GetParent().ShouldEqual("1"); grandchild.GetId().ShouldEqual("3"); grandchild.GetParent().ShouldEqual("2"); grandchild2.GetId().ShouldEqual("4"); hll.Value.ShouldEqual("HL~1~~O\nHL~2~1~I\nHL~3~2~X\nHL~4~2~X\n"); }
public Initech855Creator(IControlNumberRepository repo, IBusinessPartnerSpecificServiceResolver serviceResolver) { _repo = repo; _segmentFactory = serviceResolver.GetSegmentFactoryFor(BusinessPartner.Initech); _ediXmlBuildValues = _segmentFactory.BuildValues; }
public Fedex850Creator(IControlNumberRepository repo, IBusinessPartnerSpecificServiceResolver serviceResolver) { _repo = repo; _segmentFactory = serviceResolver.GetSegmentFactoryFor(BusinessPartner.FedEx); _buildValueFactory = serviceResolver.GetBuildValueFactoryFor(BusinessPartner.FedEx); }