Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ indent_size = 4
generated_code = true

# XML project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,nativeproj,locproj}]
[*.{slnx,csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,nativeproj,locproj}]
indent_size = 2

# Xml build files
Expand Down
8 changes: 2 additions & 6 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@
<CopyrightYearStart>2024</CopyrightYearStart>
</PropertyGroup>
<PropertyGroup>
<NetEvolve_ProjectTargetFrameworks>net8.0;net9.0</NetEvolve_ProjectTargetFrameworks>
<NetEvolve_TestTargetFrameworks>net8.0;net9.0</NetEvolve_TestTargetFrameworks>
</PropertyGroup>
<PropertyGroup>
<!-- Workaround, until https://github.com/GitTools/GitVersion/pull/4206 is released -->
<GitVersionTargetFramework>net8.0</GitVersionTargetFramework>
<NetEvolve_ProjectTargetFrameworks>net8.0;net9.0;net10.0</NetEvolve_ProjectTargetFrameworks>
<NetEvolve_TestTargetFrameworks>net8.0;net9.0;net10.0</NetEvolve_TestTargetFrameworks>
</PropertyGroup>
</Project>
7 changes: 1 addition & 6 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@
</PropertyGroup>
<ItemGroup>
<GlobalPackageReference Include="CSharpier.MSBuild" Version="1.2.1" />
<GlobalPackageReference Include="GitVersion.MsBuild" Version="6.5.1" />
<GlobalPackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4" />
<GlobalPackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="10.0.100" />
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<GlobalPackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.14.15" />
<GlobalPackageReference Include="NetEvolve.Defaults" Version="1.4.81" />
<GlobalPackageReference
Include="SonarAnalyzer.CSharp"
Version="10.16.1.129956"
Condition=" '$(BuildingInsideVisualStudio)' == 'true' "
/>
<GlobalPackageReference Include="SonarAnalyzer.CSharp" Version="10.16.1.129956" />
</ItemGroup>
<ItemGroup>
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
Expand Down
24 changes: 11 additions & 13 deletions tests/NetEvolve.FluentValue.Tests.Unit/ConstraintTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

public class ConstraintTests
{
#pragma warning disable TUnit0046 // TUnit0046: Return a `Func<T>` rather than a `<T>`
[Test]
[MethodDataSource(nameof(ChainedInvalidOperationsData))]
public void Value_ChainedInvalidOperations_ShouldThrowInvalidOperationException(Func<IConstraint> funcConstraint) =>
Expand All @@ -17,20 +16,19 @@ public void Value_ChainedInvalidOperations_ShouldThrowInvalidOperationException(
var _ = funcConstraint.Invoke();
});

public static Func<IConstraint>[] ChainedInvalidOperationsData() =>
public static IEnumerable<Func<Func<IConstraint>>> ChainedInvalidOperationsData() =>
[
() => Value.Not.Not,
() => Value.Null.And.And,
() => Value.Null.And.Or,
() => Value.Null.And.Xor,
() => Value.Null.Or.And,
() => Value.Null.Or.Or,
() => Value.Null.Or.Xor,
() => Value.Null.Xor.And,
() => Value.Null.Xor.Or,
() => Value.Null.Xor.Xor,
() => () => Value.Not.Not,
() => () => Value.Null.And.And,
() => () => Value.Null.And.Or,
() => () => Value.Null.And.Xor,
() => () => Value.Null.Or.And,
() => () => Value.Null.Or.Or,
() => () => Value.Null.Or.Xor,
() => () => Value.Null.Xor.And,
() => () => Value.Null.Xor.Or,
() => () => Value.Null.Xor.Xor,
];
#pragma warning restore TUnit0046 // TUnit0046: Return a `Func<T>` rather than a `<T>`

[Test]
public void Value_WhenNewObject_ShouldThrowNotSupportedException() =>
Expand Down
Loading