Skip to content

Add unit and integration test suite #10

@markdav-is

Description

@markdav-is

Summary

Create a test project with unit tests for core services and integration tests for the end-to-end workflow.

Depends On

  • Phases 1-5 (test as each phase lands)

Tasks

  • Create MarkDav.Oqtane.Cli.Tests xUnit test project
  • Unit tests:
    • Token replacement — all token types, multiple GUIDs, path replacement
    • Template manifest parsing — valid JSON, missing fields, malformed
    • Solution file manipulation — .slnx add project, .sln add project
    • Input validation — valid/invalid owner names, module names
  • Integration tests:
    • Full module create workflow with a sample template fixture
    • Verify generated file contents have correct token replacements
    • Verify solution file is updated
    • Error scenarios (module exists, template not found)
  • Add test fixtures:
    • Sample template.json
    • Sample template files with tokens
    • Sample .slnx and .sln files

Acceptance Criteria

  • dotnet test passes on all platforms
  • Code coverage for token replacement >= 90%
  • Integration test creates and verifies a complete module from fixtures
  • Tests run in CI (once CI is set up)

Testing Guidance from Spec

  • Unit tests for token replacement logic
  • Integration test with real Oqtane template
  • Manual test by creating a test module in actual Oqtane app and verifying it compiles

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions