Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Pull Request: Workflow Updates, Code Refactoring, and Test Enhancements#1010

Open
SilentSobs wants to merge10 commits intodotnet-architecture:main
base:main
Choose a base branch
Loading
fromSilentSobs:workflow-update

Conversation

SilentSobs
Copy link

Changes Made

Earlier

Earlier Build

Workflow Updates in .github/workflows/dotnetcore.yml:

Reasoning: Upgraded GitHub Actions to the latest versions (v4) for checkout and .NET setup(V3).
Purpose: Ensure compatibility with the latest GitHub Actions features and improvements.
Specifics:
Replaced uses: actions/checkout@v2 with uses: actions/checkout@v4.
Updated uses: actions/setup-dotnet@v1 to uses: actions/setup-dotnet@v3.
Workflow Updates in .github/workflows/richnav.yml:

Reasoning: Aligned with changes in .github/workflows/dotnetcore.yml to maintain consistency.
Purpose: Ensure uniformity across workflows and utilize the latest GitHub Actions features.
Specifics:
Replaced uses: actions/checkout@v2 with uses: actions/checkout@v4.
Updated uses: actions/setup-dotnet@v1 to uses: actions/setup-dotnet@v3.

Code Refactoring in src/ApplicationCore/Exceptions/EmptyBasketOnCheckoutException.cs:

Reasoning: Removed an obsolete constructor to adhere to best practices and eliminate warnings.
Purpose: Enhance code maintainability and eliminate obsolete features.
Specifics:
Removed the obsolete constructor.
Refactored class structure for clarity.
Test Enhancement in tests/IntegrationTests/Repositories/BasketRepositoryTests/SetQuantities.cs:

Reasoning: Improved the test assertion for better readability and adherence to xUnit best practices.
Purpose: Enhance the expressiveness and clarity of the test.
Specifics:
Replaced Assert.Equal(0, basket.Items.Count) with Assert.Empty(basket.Items).
Test Enhancement in tests/UnitTests/ApplicationCore/Entities/BasketTests/BasketRemoveEmptyItems.cs:

Reasoning: Improved the test assertion for better readability and adherence to xUnit best practices.
Purpose: Enhance the expressiveness and clarity of the test.
Specifics:
Replaced Assert.Equal(0, basket.Items.Count) with Assert.Empty(basket.Items).
Test Adjustment in tests/UnitTests/ApplicationCore/Specifications/CustomerOrdersWithItemsSpecification.cs:

Reasoning: Improved test assertions for better readability and adherence to xUnit best practices.
Purpose: Enhance the expressiveness and clarity of the tests.
Specifics:
Replaced Assert.Equal(1, result.OrderItems.Count) with Assert.Single(result.OrderItems).
Replaced Assert.Equal(2, result.Count) with Assert.Equal(2, result[1].OrderItems.Count).
Simplified other assertions for improved readability.
These changes were made to improve workflow consistency, address warnings, enhance code readability, and adhere to best practices in test assertions.

@SilentSobs
Copy link
Author

@dotnet-policy-service agree

Assert.NotNull(result[0].OrderItems.FirstOrDefault()?.ItemOrdered);
Assert.Equal(2, result[1].OrderItems.Count);
Copy link
Contributor

@SrushtiPasari94SrushtiPasari94Feb 14, 2024
edited
Loading

Choose a reason for hiding this comment

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

@SilentSobs This test is checking count in the result not the no. of results

Copy link
Author

Choose a reason for hiding this comment

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

Ok .

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@SrushtiPasari94SrushtiPasari94SrushtiPasari94 left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@SilentSobs@SrushtiPasari94

[8]ページ先頭

©2009-2025 Movatter.jp