Skip to content

Commit

Permalink
Fix issues with different provider on issue than on provider
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger committed Jul 18, 2024
1 parent dfa5284 commit 7d89bae
Show file tree
Hide file tree
Showing 19 changed files with 1,120 additions and 207 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<Authors>Cake Issues contributors</Authors>
<Copyright>Copyright © Cake Issues contributors</Copyright>
<Product>Cake.Issues</Product>

<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
<ImplicitUsings>enable</ImplicitUsings>

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Cake.Frosting" Version="4.0.0" />
<PackageReference Include="Cake.Issues.Testing" Version="4.7.1" />
<PackageReference Include="Cake.Testing" Version="4.0.0" />
<PackageReference Include="Cake.Testing.Xunit" Version="4.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Shouldly" Version="4.2.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Cake.Frosting.Issues.Recipe\Cake.Frosting.Issues.Recipe.csproj" />
</ItemGroup>

<ItemGroup>
<Using Include="Xunit" />
<Using Include="Shouldly" />
<Using Include="Cake.Testing" />
<Using Include="Cake.Issues.Testing" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
namespace Cake.Frosting.Issues.Recipe.Tests;

using System.Collections.Generic;
using Cake.Core.Diagnostics;

/// <summary>
/// Additional Implementation of a <see cref="FakeIssueProvider"/> for use in test cases.
/// </summary>
internal class FakeIssueProvider2 : FakeIssueProvider
{
private readonly List<IIssue> issues = [];

/// <summary>
/// Initializes a new instance of the <see cref="FakeIssueProvider2"/> class.
/// </summary>
/// <param name="log">The Cake log instance.</param>
public FakeIssueProvider2(ICakeLog log)
: base(log)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="FakeIssueProvider2"/> class.
/// </summary>
/// <param name="log">The Cake log instance.</param>
/// <param name="issues">Issues which should be returned by the issue provider.</param>
public FakeIssueProvider2(ICakeLog log, IEnumerable<IIssue> issues)
: base(log, issues)
{
}

/// <inheritdoc/>
public override string ProviderName => "Fake Issue Provider 2";
}
Loading

0 comments on commit 7d89bae

Please sign in to comment.