Skip to content

Add tests for build breaking aliases#1221

Merged
pascalberger merged 7 commits intocake-contrib:developfrom
pascalberger:feature/testcases
Aug 18, 2025
Merged

Add tests for build breaking aliases#1221
pascalberger merged 7 commits intocake-contrib:developfrom
pascalberger:feature/testcases

Conversation

@pascalberger
Copy link
Copy Markdown
Member

Add test cases for build breaking aliases

Copilot AI review requested due to automatic review settings August 17, 2025 23:14
@pascalberger pascalberger requested a review from a team as a code owner August 17, 2025 23:14
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds comprehensive test coverage for the BreakBuildOnIssues alias methods by implementing test cases for all method overloads and their parameter validation scenarios.

  • Introduces NSubstitute mocking framework for creating test doubles
  • Adds a CakeContextFixture helper class for creating test contexts with mocked dependencies
  • Implements extensive test coverage for 8 different overloads of the BreakBuildOnIssues method

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
packages.lock.json Adds NSubstitute 5.3.0 package dependency and its transitive dependencies (Castle.Core, System.Diagnostics.EventLog)
CakeContextFixture.cs New test helper class that creates mock Cake context with substituted dependencies for testing
Cake.Issues.Tests.csproj Adds NSubstitute package reference to enable mocking in tests
Aliases.BuildBreakingTests.cs New comprehensive test file covering all BreakBuildOnIssues method overloads with parameter validation and behavior verification

pascalberger and others added 6 commits August 18, 2025 11:09
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@pascalberger pascalberger merged commit 94ae1bb into cake-contrib:develop Aug 18, 2025
150 checks passed
@pascalberger pascalberger deleted the feature/testcases branch August 18, 2025 09:45
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.

2 participants