citrusframework / citrus

Framework for automated integration tests with focus on messaging integration
https://citrusframework.org
Apache License 2.0
456 stars 134 forks source link

TransformAction.Builder#xsltFile sets the charset of the xml resource instead of the xslt resource #965

Closed picimako closed 1 year ago

picimako commented 1 year ago

Citrus Version 4.0.0-M1

Expected behavior During digging in the Citrus code base, I noticed that TransformAction.Builder#xsltFile(String, String) although sets the charset, it is xmlResourceCharset that is set, and not xsltResourceCharset.

public Builder xsltFile(String xsltResourcePath, String charset) {
    this.xsltResourcePath = xsltResourcePath;
    this.xmlResourceCharset = charset;
    return this;
}

Actual behavior I think xsltFile(String, String) should set the charset in xsltResourceCharset like this:

this.xsltResourceCharset = charset;

Test case sample

--

bbortt commented 1 year ago

nice catch, that would make sense!

christophd commented 1 year ago

Many thanks! good one! @picimako would you be able to open a fix PR for this! Much appreciated!

picimako commented 1 year ago

@christophd Sure, I'll look into it probably sometime this week.