Skip to content

Add unit tests for ContainmentUpdater, ContainerList, and StructuralFeatureHelper#28

Open
samatstariongroup wants to merge 1 commit intodevelopmentfrom
codex/add-unit-tests-for-components
Open

Add unit tests for ContainmentUpdater, ContainerList, and StructuralFeatureHelper#28
samatstariongroup wants to merge 1 commit intodevelopmentfrom
codex/add-unit-tests-for-components

Conversation

@samatstariongroup
Copy link
Member

Motivation

  • Improve unit-test coverage around containment semantics and container collections to prevent regressions in reparenting and removal behavior.
  • Validate Handlebars helpers for EStructuralFeature to ensure block-helper rendering and type-name resolution behave as expected.

Description

  • Added ECoreNetto.Tests/ModelElement/ContainerListTestFixture.cs which tests ContainerList<T> behavior including Add, AddRange, and indexer setter validations and re-parenting.
  • Added ECoreNetto.Tests/Utils/ContainmentUpdaterTestFixture.cs which tests ContainmentUpdater.RemoveFromContainer for null input, no-container no-op, supported-type removals, and unsupported-type exception path.
  • Extended ECoreNetto.HandleBars.Tests/StructuralFeatureHelperTestFixture.cs with tests for the StructuralFeature.IsEnumerable block helper and StructuralFeature.QueryTypeName success and invalid-context exception cases.

Testing

  • Attempted to run the test project with dotnet test ECoreNetto.Tests/ECoreNetto.Tests.csproj --no-restore but execution failed because dotnet is not installed in this environment (bash: command not found: dotnet).
  • No automated tests were executed here; the added tests should be run by CI or a local environment with the .NET SDK to verify success.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant