#709-unit-tests-for-layoutService #757

Merged
a22erigr merged 18 commits from #709-unit-tests-for-layoutService into team_2_week_4 2026-05-06 07:31:57 +00:00
Collaborator

Implementation of tests in layoutService

On what device?

This has been developed on an Arch-based Linux distro and tested using dotnet tests.

What has been done?

  • I removed "service/layoutService/layoutService/Models/Response/LayoutResponseList.cs" and "service/layoutService/layoutService.Test/UnitTest1.cs" since they weren't being used.
  • Restructured "service/layoutService/layoutService/Endpoints/LayoutEndpoints.cs" to be easier to test.
  • Created the file "service/layoutService/layoutService.Tests/Endpoints/LayoutEndpointsTests.cs". It contains tests for the endpoints. It could probably be broken out like the tests for LayoutService.
  • I created the folder "layoutService.Tests/Services/LayoutService". In it are 5 files, one per method in the "LayoutService" service. The general structure of the tests is first the happy path (when a good input is given and nothing throws an error), then a general "bad path" (where something goes wrong).

Issue:

#709

# Implementation of tests in layoutService ## On what device? This has been developed on an Arch-based Linux distro and tested using dotnet tests. ## What has been done? * I removed "**service/layoutService/layoutService/Models/Response/LayoutResponseList.cs**" and "**service/layoutService/layoutService.Test/UnitTest1.cs**" since they weren't being used. * Restructured "**service/layoutService/layoutService/Endpoints/LayoutEndpoints.cs**" to be easier to test. * Created the file "**service/layoutService/layoutService.Tests/Endpoints/LayoutEndpointsTests.cs**". It contains tests for the endpoints. It could probably be broken out like the tests for LayoutService. * I created the folder "**layoutService.Tests/Services/LayoutService**". In it are 5 files, one per method in the "LayoutService" service. The general structure of the tests is first the happy path (when a good input is given and nothing throws an error), then a general "bad path" (where something goes wrong). ## Issue: #709
Collaborator

Review on #709

Tested on Windows 11 using dot.net

  • App starts using rebuild script
    • All 6 new tests ran

Inspected following files

  • service/layoutService/layoutService.Test/UnitTest1.cs (Removed)
    • Valid reason for removal
  • service/layoutService/layoutService/Models/Response/LayoutResponseList.cs (Removed)
    • Valid reason for removal
  • service/layoutService/layoutService/Endpoints/LayoutEndpoints.cs
    • Indentation/code styling
      • Follows all standards set for C#
    • Naming convention
      • Follows naming conventions and names are clear
    • Comments
      • Well commented
    • General code quality
      • Good Quality. Makes the code more readable and cleaner
  • service/layoutService/layoutService.Tests/Endpoints/LayoutEndpointsTests.cs
    • Indentation/code styling
      • Follows all standards set for C#/testing
    • Naming convention
      • Follows naming conventions and names are clear
    • Comments
      • Well commented
    • General code quality
      • Good Quality.
  • service/layoutService/layoutService.Tests/Services/LayoutService.tests/*
    • All tests have the same structure/content (excepts paths/names) and will be reviewed together
    • Indentation/code styling
      • Follows all standards set for C#/testing
    • Naming convention
      • Follows naming conventions and names are clear
    • Comments
      • Well commented
    • General code quality
      • Good Quality.

What needs to be done

  • Nothing!

Conclusion

  • Good restructure of LayoutEndpoints.cs
  • I agree that the Endpoint tests could be broken out, but definitely not necessary.
# Review on #709 ### Tested on Windows 11 using dot.net + App starts using rebuild script + All 6 new tests ran ### Inspected following files + service/layoutService/layoutService.Test/UnitTest1.cs (Removed) + Valid reason for removal + service/layoutService/layoutService/Models/Response/LayoutResponseList.cs (Removed) + Valid reason for removal + service/layoutService/layoutService/Endpoints/LayoutEndpoints.cs + Indentation/code styling + Follows all standards set for C# + Naming convention + Follows naming conventions and names are clear + Comments + Well commented + General code quality + Good Quality. Makes the code more readable and cleaner + service/layoutService/layoutService.Tests/Endpoints/LayoutEndpointsTests.cs + Indentation/code styling + Follows all standards set for C#/testing + Naming convention + Follows naming conventions and names are clear + Comments + Well commented + General code quality + Good Quality. + service/layoutService/layoutService.Tests/Services/LayoutService.tests/* + All tests have the same structure/content (excepts paths/names) and will be reviewed together + Indentation/code styling + Follows all standards set for C#/testing + Naming convention + Follows naming conventions and names are clear + Comments + Well commented + General code quality + Good Quality. ## What needs to be done + Nothing! ## Conclusion + Good restructure of LayoutEndpoints.cs + I agree that the Endpoint tests could be broken out, but definitely not necessary.
a24vinla approved these changes 2026-05-06 07:28:44 +00:00
a22erigr merged commit 7d1b5830bf into team_2_week_4 2026-05-06 07:31:57 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K!757
No description provided.