Fix namespace validation and move tests to OpNodeTest3 project#63
Fix namespace validation and move tests to OpNodeTest3 project#63
Conversation
Co-authored-by: marcnoon <883172+marcnoon@users.noreply.github.com>
Co-authored-by: marcnoon <883172+marcnoon@users.noreply.github.com>
|
@copilot I updated the unit test to use the project OpNodeTest3 and please fix any tests and add any remaining test in this unit test project related to this issue. I unloaded the other test projects and unrelated projects that aren't based on the windows forms project. The projects were standardized using the same build and dotnet versioning and cpu strategy. |
Co-authored-by: marcnoon <883172+marcnoon@users.noreply.github.com>
I've successfully moved all namespace-related tests to the OpNodeTest3 project and standardized the project structure. The changes include:
All tests focus on validating the enhanced namespace validation system that now supports XML-compliant naming conventions instead of the previous hardcoded limitations. The tests cover edge cases, validation scenarios, and file I/O operations to ensure comprehensive coverage of issue #62. Commit: 661f060 |
This PR addresses critical limitations in the OpNode namespace, prefix, and suffix functionality by replacing hardcoded validation with XML-compliant rules and consolidating all tests into the OpNodeTest3 project as requested.
Key Changes
Fixed Hardcoded Namespace Validation
The
IsValidNamespace()method inpNode.cswas previously limited to only two hardcoded values ("ns" and "prefix"), severely restricting the namespace system's usability:Enhanced Validation Examples
Now supports industry-standard namespace patterns:
math:operations,data:content,ui_controls:buttonapp-settings:config,api.v2:endpoint123invalid:test(starts with number),xml:reserved(reserved prefix)Consolidated Test Coverage in OpNodeTest3
All namespace-related tests have been moved to the OpNodeTest3 project and standardized:
UnitTest_Namespace.cs- Core namespace functionality, creation, cloning, and basic validationUnitTest_NamespaceUsability.cs- Real-world file I/O scenarios with XMLUnitTest_PrefixSuffix.cs- Dedicated testing for prefix and suffix combinationsProject Standardization
UnitTestProject1throughout the projectFile I/O Verification
Tested and verified that namespace information is properly preserved in XML export/import operations and complex hierarchical structures with mixed namespace prefixes and suffixes.
Impact
This change removes artificial constraints on namespace usage while maintaining XML compliance, enabling the OpNode system to work with industry-standard namespace conventions. The comprehensive test suite in OpNodeTest3 ensures reliability and prevents regressions.
Fixes #62.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.