EDI.Net icon indicating copy to clipboard operation
EDI.Net copied to clipboard

Component Element Separator is always null

Open chz160 opened this issue 7 years ago • 1 comments

The Component Element Separator (ISA16) appears to always be null. If I were to guess, because it is being parsed as an actual Component Element Separator. :-D

[Fact]
[Trait(Traits.Tag, "X12")]
public void X12_Component_Element_Separator_Should_Not_Be_Null() {
    var grammar = EdiGrammar.NewX12();
    var interchange = default(Models.PurchaseOrder_850);
    using (var stream = Helpers.GetResourceStream("x12.850.edi")) {
        interchange = new EdiSerializer().Deserialize<Models.PurchaseOrder_850>(new StreamReader(stream), grammar);
    }
    Assert.NotNull(interchange.Component_Element_Separator);
}

P.S. Awesome library btw!

chz160 avatar Oct 04 '17 03:10 chz160

Hi @chz160 and thanks for the kind words.

Yes this is true. This is related to #19 and it is not implemented completely to take into account the advise characters for X12 that have predefined locations.

cleftheris avatar Oct 04 '17 08:10 cleftheris