Giter Club home page Giter Club logo

Comments (5)

duaneedwards avatar duaneedwards commented on May 18, 2024

Thanks limsbeheer.

I'm pretty sure that this has already been fixed as a part of c0375c7

I haven't been able to reproduce this locally, are you running version 2.4.0.7? This change should be a part of that release.

from nhapi.

limsbeheer avatar limsbeheer commented on May 18, 2024

I just downloaded the latest sources (which is 2.4.0.7) with the "Download ZIP" button and built it. Now when I call PipeParser.GetMessageStructureForEvent it still gives me value "ADT_A04" instead of "ADT_A01".
The fix you made in the private constructor is needed to get the package name without trailing dot to load the assembly succesfully. But the dot remains in property package.PackageName.
So when method GetAssemblyEventMapping is called in the constructor, package.EventMappingResourceName still contains "NHapi.Model.V25..EventMapping.EventMap.properties" (with two dots) and therefore variable inResource stays null.
Do you not experience such behaviour?

from nhapi.

duaneedwards avatar duaneedwards commented on May 18, 2024

Strange ... I'm unable to reproduce this however the problem may lie with my test method?

Here's what I'm running locally to verify this:

[Test]
public void TestAdtA04AndA01MessageStructure()
{
    var result = PipeParser.GetMessageStructureForEvent("ADT_A04", "2.5");
    Assert.AreSame("ADT_A04", result);

    result = PipeParser.GetMessageStructureForEvent("ADT_A01", "2.5");
    Assert.AreSame("ADT_A01", result);
}

Does this differ from what you are attempting to run?

from nhapi.

limsbeheer avatar limsbeheer commented on May 18, 2024

Yes: input value "ADT_A04" should yield "ADT_A01" since A01 is the structure for event A04. So the first Assert should be: Assert.AreSame("ADT_A01", result);
The second assert is correct: A01 is the structure for event A01.
Other events which use the A01 structure are A08 and A13.

from nhapi.

duaneedwards avatar duaneedwards commented on May 18, 2024

Ahhh... it all makes sense now. I misread it the other way around and as such my tests weren't reporting back any errors as you can tell.

You're right, I'll strip out the prepending '.' from the EventMappingResourceName getter which will make the assembly load as it should.

I'll put this fix in the next release, A04's, A13's and A08's are now returning A01 as expected.

from nhapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.