Skip to content

Conversation

@PTKu
Copy link
Contributor

@PTKu PTKu commented Jan 24, 2025

This pull request includes several changes to improve the handling of string capacities, normalize string values, and enhance test coverage. The most important changes include adding a new NormalizeString method, modifying the Capacity property, and updating the unit tests to use ITestOutputHelper.

String Handling Improvements:

  • Added a NormalizeString method to ensure string values do not exceed the defined capacity in WebApiString and WebApiWString classes. [1] [2] [3] [4]

Capacity Property Updates:

  • Introduced the Capacity property to OnlinerBase class to define the declared size of the string.
  • Removed redundant Capacity property definitions from OnlinerString and OnlinerWString classes. [1] [2]

Unit Test Enhancements:

Dependency and Configuration Updates:

  • Added Newtonsoft.Json.Linq to WebApiString class.
  • Updated AXSharp.config.json to include TargetPlatfromMoniker.

These changes enhance the robustness of string handling and improve the testability and maintainability of the codebase.

Closing #364

@PTKu PTKu merged commit 1ea5456 into dev Jan 24, 2025
2 checks passed
@PTKu PTKu deleted the 364-when-writing-a-string-to-the-plc-and-length-more-than-declared-exception-occurs branch January 24, 2025 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants