Fixed the Json creation #783

Merged
a22erigr merged 5 commits from #762-refactor-the-function-GetLayoutNameAndID(int-userID) into team_2_week_5 2026-05-07 08:00:37 +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?

  • The real change is in "service/layoutService/layoutService/Services/LayoutService.cs" and "service/layoutService/layoutService/Models/Response/LayoutNameResponse.cs". The latter was created as an object to be serialized to the JSON object. The Former had its "GetLayoutNameAndId" method to use the new object and use the JsonSerializer.Serialize method instead of building its own JSON from scratch. *

  • The rest of the files had just some light code clean up (many fixing incorrect spelling and indentation).

Issue:

#762

# 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? * The real change is in "**service/layoutService/layoutService/Services/LayoutService.cs**" and "**service/layoutService/layoutService/Models/Response/LayoutNameResponse.cs**". The latter was created as an object to be serialized to the JSON object. The Former had its "_GetLayoutNameAndId_" method to use the new object and use the JsonSerializer.Serialize method instead of building its own JSON from scratch. * * The rest of the files had just some light code clean up (many fixing incorrect spelling and indentation). ## Issue: #762
Collaborator

Review on #783

Tested on Windows using dotnet test

  • Verified that the issue requirement (removal of manual JSON construction) is fulfilled.
  • Confirmed that GetLayoutNameAndId now uses JsonSerializer.Serialize instead of manually building a JSON string.
  • Ran all tests using dotnet test and all tests passed.
  • Manual JSON construction has been replaced with proper serialization using JsonSerializer, improving code clarity and reducing risk of errors.

Inspected following files LayoutService.cs , LayoutNameResponse.cs

  • Inspected these 2 files.

    • Indentation/code styling
      • Indentation is OK.
  • Naming convention

    • Naming convention is followed.
  • Comments

    • Enough comments to understand.
  • General code quality

    • Code is cleaner after refactor and follows standard.
    • Uses JsonSerializer instead of manual JSON construction.

What needs to be done

Nothing for now.

Conclusion

My conclusion is that the issue is solved, and functionality works as expected.

# Review on #783 ### Tested on Windows using dotnet test + Verified that the issue requirement (removal of manual JSON construction) is fulfilled. + Confirmed that GetLayoutNameAndId now uses JsonSerializer.Serialize instead of manually building a JSON string. + Ran all tests using dotnet test and all tests passed. + Manual JSON construction has been replaced with proper serialization using JsonSerializer, improving code clarity and reducing risk of errors. ### Inspected following files **LayoutService.cs** , LayoutNameResponse.cs + Inspected these 2 files. + Indentation/code styling + Indentation is OK. + Naming convention + Naming convention is followed. + Comments + Enough comments to understand. + General code quality + Code is cleaner after refactor and follows standard. + Uses JsonSerializer instead of manual JSON construction. ## What needs to be done Nothing for now. ## Conclusion My conclusion is that the issue is solved, and functionality works as expected.
a22erigr merged commit 005e84ca8f into team_2_week_5 2026-05-07 08:00:37 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 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!783
No description provided.