Skip to content

Commit 1c3b232

Browse files
authored
Merge pull request #44 from kmcc049/Fixing-build-test-behaviour-after-upgrade
Fixing tests after upgrade
2 parents cceebf1 + b948257 commit 1c3b232

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

PowerAssertTests/Approvals/EndToEndTest.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ public void PolyAssert()
484484
poly.IsTrue(() => x == 5);
485485
poly.IsTrue(() => x == 6);
486486
poly.IsTrue(() => x == 7);
487-
poly.Try(() => Assert.Fail("Wah wah"));
487+
poly.Try(() => throw new Exception("Wah wah"));
488488
poly.Log("PolyAssert.Log messages are only printed if the test fails");
489489
}
490490
}
@@ -506,7 +506,7 @@ public void PolyAssertCanFinishEarly()
506506
poly.Log("Sometimes you do want to end the test early after all");
507507
poly.StopIfErrorsHaveOccurred(); //no stop here
508508
poly.Log("So just call StopIfErrorsHaveOccurred (behaves the same as disposing the PolyAssert)");
509-
poly.Try(() => Assert.Fail("Wah wah"));
509+
poly.Try(() => throw new Exception("Wah wah"));
510510
poly.StopIfErrorsHaveOccurred(); //no stop here
511511
poly.Log("This message should not be printed, as StopIfErrorsHaveOccurred will throw an exception this time");
512512
}

PowerAssertTests/PowerAssertTests.csproj

+9-5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
<PropertyGroup>
44
<TargetFrameworks>net45</TargetFrameworks>
55
</PropertyGroup>
6+
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
7+
<DebugType>full</DebugType>
8+
<DebugSymbols>true</DebugSymbols>
9+
</PropertyGroup>
610

711
<ItemGroup>
812
<Reference Include="System" />
@@ -22,10 +26,10 @@
2226
</ProjectReference>
2327
</ItemGroup>
2428
<ItemGroup>
25-
<PackageReference Include="ApprovalTests" Version="3.0.7" />
26-
<PackageReference Include="ApprovalUtilities" Version="3.0.7" />
27-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
28-
<PackageReference Include="nunit" Version="3.13.1" />
29-
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
29+
<PackageReference Include="ApprovalTests" Version="3.0.7" />
30+
<PackageReference Include="ApprovalUtilities" Version="3.0.7" />
31+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
32+
<PackageReference Include="nunit" Version="3.13.1" />
33+
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
3034
</ItemGroup>
3135
</Project>

0 commit comments

Comments
 (0)