Skip to content

Commit

Permalink
Merge pull request #135 from pfpack/release/v2.2.0-preview.9
Browse files Browse the repository at this point in the history
release/v2.2.0-preview.9
  • Loading branch information
andreise authored Feb 8, 2024
2 parents 224f8e0 + 3bad6e3 commit c215dff
Show file tree
Hide file tree
Showing 118 changed files with 725 additions and 722 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
Expand Down Expand Up @@ -96,6 +96,12 @@ jobs:
- name: Pack Result
run: dotnet pack ./src/*/*/Result.csproj --no-restore -o ~/nuget -c Release

- name: Restore Result.Tests.Old
run: dotnet restore ./src/*/*/Result.Tests.Old.csproj

- name: Test Result.Tests.Old
run: dotnet test ./src/*/*/Result.Tests.Old.csproj --no-restore -c Release

- name: Restore Result.Tests
run: dotnet restore ./src/*/*/Result.Tests.csproj

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2023 Andrei Sergeev, Pavel Moskovoy
Copyright (c) 2020-2024 Andrei Sergeev, Pavel Moskovoy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 1 addition & 0 deletions src/core-taggeds-result/Result.Tests.Old/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global using NUnit.Framework;
33 changes: 33 additions & 0 deletions src/core-taggeds-result/Result.Tests.Old/Result.Tests.Old.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<InvariantGlobalization>true</InvariantGlobalization>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<Authors>Andrei Sergeev, Pavel Moskovoy</Authors>
<Copyright>Copyright © 2020-2024 Andrei Sergeev, Pavel Moskovoy</Copyright>
<RootNamespace>PrimeFuncPack.Core.Tests</RootNamespace>
<AssemblyName>PrimeFuncPack.Core.Result.Tests.Old</AssemblyName>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="NUnit" Version="4.0.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="PrimeFuncPack.UnitTest.Data" Version="3.1.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Result\Result.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using NUnit.Framework;
using PrimeFuncPack.UnitTest;
using System;
using static PrimeFuncPack.UnitTest.TestData;
Expand All @@ -14,7 +13,7 @@ public void EqualsObject_SourceIsDefaultAndOtherIsDefaultAndTypesAreSame_ExpectT
object? other = default(FailureBuilder<StructType>);

var actual = source.Equals(other);
Assert.True(actual);
Assert.That(actual, Is.True);
}

[Test]
Expand All @@ -24,7 +23,7 @@ public void EqualsObject_SourceIsDefaultAndOtherFailureIsDefaultAndTypesAreSame_
object? other = Result.Failure(default(StructType));

var actual = source.Equals(other);
Assert.True(actual);
Assert.That(actual, Is.True);
}

[Test]
Expand All @@ -34,7 +33,7 @@ public void EqualsObject_SourceFailureIsDefaultAndOtherIsDefaultAndTypesAreSame_
object? other = default(FailureBuilder<StructType>);

var actual = source.Equals(other);
Assert.True(actual);
Assert.That(actual, Is.True);
}

[Test]
Expand All @@ -44,7 +43,7 @@ public void EqualsObject_SourceFailureIsDefaultAndOtherFailureIsDefaultAndTypesA
object? other = Result.Failure(new SomeError());

var actual = source.Equals(other);
Assert.True(actual);
Assert.That(actual, Is.True);
}

[Test]
Expand All @@ -59,7 +58,7 @@ public void EqualsObject_SourceFailureIsEqualToOtherFailureAndTypesAreSame_Expec
object? other = Result.Failure(otherFailure);

var actual = source.Equals(other);
Assert.True(actual);
Assert.That(actual, Is.True);
}

[Test]
Expand All @@ -69,7 +68,7 @@ public void EqualsObject_SourceIsDefaultAndOtherIsDefaultAndTypesAreNotSame_Expe
object? other = new FailureBuilder<StructType>();

var actual = source.Equals(other);
Assert.False(actual);
Assert.That(actual, Is.False);
}

[Test]
Expand All @@ -79,7 +78,7 @@ public void EqualsObject_SourceIsDefaultAndOtherFailureIsDefaultAndTypesAreNotSa
object? other = Result.Failure(default(SomeError));

var actual = source.Equals(other);
Assert.False(actual);
Assert.That(actual, Is.False);
}

[Test]
Expand All @@ -89,7 +88,7 @@ public void EqualsObject_SourceFailureIsDefaultAndOtherIsDefaultAndTypesAreNotSa
object? other = default(FailureBuilder<StructType>);

var actual = source.Equals(other);
Assert.False(actual);
Assert.That(actual, Is.False);
}

[Test]
Expand All @@ -99,7 +98,7 @@ public void EqualsObject_SourceFailureIsDefaultAndOtherFailureIsDefaultAndTypesA
object? other = Result.Failure(new SomeError());

var actual = source.Equals(other);
Assert.False(actual);
Assert.That(actual, Is.False);
}

[Test]
Expand All @@ -110,7 +109,7 @@ public void EqualsObject_SourceFailureIsEqualToOtherFailureAndTypesAreNotSame_Ex
object? other = Result.Failure<decimal>(someValue);

var actual = source.Equals(other);
Assert.False(actual);
Assert.That(actual, Is.False);
}

[Test]
Expand All @@ -119,7 +118,7 @@ public void EqualsObject_SourceIsDefaultAndOtherIsNull_ExpectFalse()
var source = new FailureBuilder<StructType>();

var actual = source.Equals(null);
Assert.False(actual);
Assert.That(actual, Is.False);
}

[Test]
Expand All @@ -128,7 +127,7 @@ public void EqualsObject_SourceIsNotDefaultAndOtherIsNull_ExpectFalse()
var source = Result.Failure(MinusFifteen);

var actual = source.Equals(null);
Assert.False(actual);
Assert.That(actual, Is.False);
}

[Test]
Expand All @@ -138,7 +137,7 @@ public void EqualsObject_SourceIsDefaultAndOtherIsNotDefaultAndTypesAreSame_Expe
object? other = Result.Failure(PlusFifteen);

var actual = source.Equals(other);
Assert.False(actual);
Assert.That(actual, Is.False);
}

[Test]
Expand All @@ -151,6 +150,6 @@ public void EqualsObject_SourceFailureIsNotEqualToOtherFailureAndTypesAreSame_Ex
object? other = Result.Failure(otherFailure);

var actual = source.Equals(other);
Assert.False(actual);
Assert.That(actual, Is.False);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using NUnit.Framework;
using PrimeFuncPack.UnitTest;
using System;
using static PrimeFuncPack.UnitTest.TestData;
Expand All @@ -14,7 +13,7 @@ public void EqualsOther_SourceIsDefaultAndOtherIsDefault_ExpectTrue()
var other = new FailureBuilder<StructType>();

var actual = source.Equals(other);
Assert.True(actual);
Assert.That(actual, Is.True);
}

[Test]
Expand All @@ -24,7 +23,7 @@ public void EqualsOther_SourceIsDefaultAndOtherFailureIsDefault_ExpectTrue()
var other = Result.Failure(default(StructType));

var actual = source.Equals(other);
Assert.True(actual);
Assert.That(actual, Is.True);
}

[Test]
Expand All @@ -34,7 +33,7 @@ public void EqualsOther_SourceFailureIsDefaultAndOtherIsDefault_ExpectTrue()
var other = default(FailureBuilder<StructType>);

var actual = source.Equals(other);
Assert.True(actual);
Assert.That(actual, Is.True);
}

[Test]
Expand All @@ -44,7 +43,7 @@ public void EqualsOther_SourceFailureIsDefaultAndOtherFailureIsDefault_ExpectTru
var other = Result.Failure(new SomeError());

var actual = source.Equals(other);
Assert.True(actual);
Assert.That(actual, Is.True);
}

[Test]
Expand All @@ -59,7 +58,7 @@ public void EqualsOther_SourceFailureIsEqualToOtherFailure_ExpectTrue()
var other = Result.Failure(otherFailure);

var actual = source.Equals(other);
Assert.True(actual);
Assert.That(actual, Is.True);
}

[Test]
Expand All @@ -69,7 +68,7 @@ public void EqualsOther_SourceIsDefaultAndOtherIsNotDefault_ExpectFalse()
var other = Result.Failure(PlusFifteen);

var actual = source.Equals(other);
Assert.False(actual);
Assert.That(actual, Is.False);
}

[Test]
Expand All @@ -82,7 +81,7 @@ public void EqualsOther_SourceFailureIsNotEqualToOtherFailure_ExpectFalse()
var other = Result.Failure(otherFailure);

var actual = source.Equals(other);
Assert.False(actual);
Assert.That(actual, Is.False);
}

[Test]
Expand All @@ -92,7 +91,7 @@ public void EqualsObject_SourceSuccessIsNullAndOtherSuccessIsNotNull_ExpectFalse
var other = Result.Success<SomeRecord>(new ());

var actual = source.Equals(other);
Assert.False(actual);
Assert.That(actual, Is.False);
}

[Test]
Expand All @@ -102,6 +101,6 @@ public void EqualsObject_SourceSuccessIsNotNullAndOtherSuccessIsNull_ExpectFalse
var other = Result.Success<RefType>(null!);

var actual = source.Equals(other);
Assert.False(actual);
Assert.That(actual, Is.False);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using NUnit.Framework;
using PrimeFuncPack.UnitTest;
using System;
using static PrimeFuncPack.UnitTest.TestData;
Expand All @@ -14,7 +13,7 @@ public void EqualsStatic_LeftIsDefaultAndRightIsDefault_ExpectTrue()
var right = default(FailureBuilder<int>);

var actual = FailureBuilder<int>.Equals(left, right);
Assert.True(actual);
Assert.That(actual, Is.True);
}

[Test]
Expand All @@ -24,7 +23,7 @@ public void EqualsStatic_LeftIsDefaultAndRightFailureIsDefault_ExpectTrue()
var right = Result.Failure(default(SomeError));

var actual = FailureBuilder<SomeError>.Equals(left, right);
Assert.True(actual);
Assert.That(actual, Is.True);
}

[Test]
Expand All @@ -34,7 +33,7 @@ public void EqualsStatic_LeftFailureIsDefaultAndRightIsDefault_ExpectTrue()
var right = default(FailureBuilder<StructType>);

var actual = FailureBuilder<StructType>.Equals(left, right);
Assert.True(actual);
Assert.That(actual, Is.True);
}

[Test]
Expand All @@ -44,7 +43,7 @@ public void EqualsStatic_LeftFailureIsDefaultAndRightFailureIsDefault_ExpectTrue
var right = Result.Failure(default(StructType));

var actual = FailureBuilder<StructType>.Equals(left, right);
Assert.True(actual);
Assert.That(actual, Is.True);
}

[Test]
Expand All @@ -65,7 +64,7 @@ public void EqualsStatic_LeftFailureIsEqualToRightFailure_ExpectTrue()
var right = Result.Failure(rightFailure);

var actual = FailureBuilder<StructType>.Equals(left, right);
Assert.True(actual);
Assert.That(actual, Is.True);
}

[Test]
Expand All @@ -75,7 +74,7 @@ public void EqualsStatic_LeftIsDefaultAndRightIsNotDefault_ExpectFalse()
var right = Result.Failure(decimal.One);

var actual = FailureBuilder<decimal>.Equals(left, right);
Assert.False(actual);
Assert.That(actual, Is.False);
}

[Test]
Expand All @@ -88,6 +87,6 @@ public void EqualsStatic_LeftFailureIsNotEqualToRightFailure_ExpectFalse()
var right = Result.Failure(rightFailure);

var actual = FailureBuilder<SomeError>.Equals(left, right);
Assert.False(actual);
Assert.That(actual, Is.False);
}
}
Loading

0 comments on commit c215dff

Please sign in to comment.