Skip to content

Reorganize folder structure and add XUnit test framework#8

Merged
lqdev merged 5 commits into
mainfrom
copilot/organize-folder-structure-add-xunit
Jan 24, 2026
Merged

Reorganize folder structure and add XUnit test framework#8
lqdev merged 5 commits into
mainfrom
copilot/organize-folder-structure-add-xunit

Conversation

Copilot AI commented Jan 24, 2026

Copy link
Copy Markdown
Contributor

Reorganizes repository to follow F# project conventions with separate src/ and tests/ directories. Adds XUnit test infrastructure with initial domain type tests.

Changes

  • Project structure: Moved all source files to src/WebmentionFs/, created tests/WebmentionFs.Tests/
  • Solution file: Added WebmentionFs.slnx (XML format) with logical folder organization
  • Test framework: XUnit on .NET 8.0 with project reference to main library (netstandard2.1)
  • Initial tests: 4 unit tests covering core domain types (UrlData, EndpointUrlData, MentionTypes, Webmention)
  • Documentation: Updated README with folder structure, build commands, and test instructions; updated test.fsx path reference

Structure

WebmentionFs/
├── src/WebmentionFs/              # Main library
│   ├── Domain.fs
│   ├── *Service.fs files
│   └── WebmentionFs.fsproj
├── tests/WebmentionFs.Tests/      # XUnit tests
│   ├── Tests.fs
│   └── WebmentionFs.Tests.fsproj
└── WebmentionFs.slnx              # Solution file

Build

dotnet build WebmentionFs.slnx     # Build all
dotnet test                         # Run tests
Original prompt

This section details on the original issue you should resolve

<issue_title>Organize folder structure and add XUnit testing framework</issue_title>
<issue_description>## Organize Folder Structure and Add Testing Framework

To improve maintainability and follow best practices for F# /.NET projects, we should organize the folder structure as follows:

Proposed Folder Structure

  • src/ — Contains the main project code
    • WebmentionFs/
      • Your F# source files (.fs)
      • Project file (WebmentionFs.fsproj)
  • tests/ — Contains all tests
    • WebmentionFs.Tests/
      • XUnit-based test files (.fs)
      • Project file (WebmentionFs.Tests.fsproj)

Steps to Implement

  1. **Move main logic into src/WebmentionFs/
  2. Create a test project in tests/WebmentionFs.Tests/ using XUnit (the most common open-source .NET test framework).
    • Add XUnit NuGet package to the test project.
    • Ensure the test project references the main project.
    • Add example/unit tests for existing code.
  3. (Optional) Solution File
    • If we add a solution, prefer SLNX
  4. Update README with structure info and test running instructions.

References


Deliverable: A well-organized folder structure and at least one XUnit-based test.

Labels: documentation, question</issue_description>

<agent_instructions>Make changes small and atomic. Make them self-contained. Test your changes. Commit early and often. Think deeply about your solution</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits January 24, 2026 21:41
Co-authored-by: lqdev <11130940+lqdev@users.noreply.github.com>
Co-authored-by: lqdev <11130940+lqdev@users.noreply.github.com>
Co-authored-by: lqdev <11130940+lqdev@users.noreply.github.com>
Co-authored-by: lqdev <11130940+lqdev@users.noreply.github.com>
Copilot AI changed the title [WIP] Organize folder structure and add XUnit testing framework Reorganize folder structure and add XUnit test framework Jan 24, 2026
Copilot AI requested a review from lqdev January 24, 2026 21:48
@lqdev
lqdev marked this pull request as ready for review January 24, 2026 21:48
Copilot AI review requested due to automatic review settings January 24, 2026 21:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reorganizes the repository into standard src/ and tests/ layout and introduces an XUnit-based test project for the WebmentionFs library.

Changes:

  • Moved library sources into src/WebmentionFs/ and created tests/WebmentionFs.Tests/ with XUnit on .NET 8.
  • Added WebmentionFs.slnx solution for building/testing the whole repo.
  • Updated README and test.fsx to reflect new structure and test commands.

Reviewed changes

Copilot reviewed 5 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/WebmentionFs.Tests/WebmentionFs.Tests.fsproj Adds XUnit test project referencing the main library.
tests/WebmentionFs.Tests/Tests.fs Introduces initial unit tests for core domain types.
test.fsx Updates referenced DLL path to match new src/ structure.
src/WebmentionFs/WebmentionValidationService.fs Adds/relocates webmention content validation logic under src/.
src/WebmentionFs/WebmentionSenderService.fs Adds/relocates sender service for endpoint delivery under src/.
src/WebmentionFs/WebmentionReceiverService.fs Adds/relocates receiver service composing request + content validation.
src/WebmentionFs/WebmentionFs.fsproj New project file under src/ with package metadata and compile includes.
src/WebmentionFs/Utils.fs Adds/relocates shared HTTP/form/HTML helper utilities.
src/WebmentionFs/UrlDiscoveryService.fs Adds/relocates endpoint discovery implementation under src/.
src/WebmentionFs/RequestValidationService.fs Adds/relocates request validation logic and error handling.
src/WebmentionFs/Domain.fs Adds/relocates core domain/result types.
src/WebmentionFs/Constants.fs Adds/relocates constants (selectors, error messages, etc.).
WebmentionFs.slnx Adds solution file organizing src and tests projects.
README.md Documents new folder structure and build/test instructions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lqdev
lqdev merged commit bbdc1ab into main Jan 24, 2026
6 checks passed
@lqdev
lqdev deleted the copilot/organize-folder-structure-add-xunit branch January 24, 2026 22:02
Copilot AI added a commit that referenced this pull request Jan 24, 2026
…re from PR #8

Co-authored-by: lqdev <11130940+lqdev@users.noreply.github.com>
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.

Organize folder structure and add XUnit testing framework

3 participants