Skip to content

Commit 4ff374a

Browse files
Merge pull request #132 from Particular/master-update-dev-tooling
master update dev tooling
2 parents f954732 + 58cde10 commit 4ff374a

File tree

5 files changed

+13
-50
lines changed

5 files changed

+13
-50
lines changed
Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,15 @@
1-
#if NET452
2-
using System;
3-
using System.IO;
4-
using System.Linq;
5-
using System.Reflection;
6-
using System.Runtime.CompilerServices;
7-
using ApprovalTests;
1+
using NServiceBus.Testing;
82
using NUnit.Framework;
3+
using Particular.Approvals;
94
using PublicApiGenerator;
105

116
[TestFixture]
127
public class APIApprovals
138
{
149
[Test]
15-
[MethodImpl(MethodImplOptions.NoInlining)]
1610
public void Approve()
1711
{
18-
var combine = Path.Combine(TestContext.CurrentContext.TestDirectory, "NServiceBus.Testing.dll");
19-
var assembly = Assembly.LoadFile(combine);
20-
var publicApi = Filter(ApiGenerator.GeneratePublicApi(assembly));
21-
Approvals.Verify(publicApi);
22-
23-
}
24-
25-
string Filter(string text)
26-
{
27-
return string.Join(Environment.NewLine, text.Split(new[]
28-
{
29-
Environment.NewLine
30-
}, StringSplitOptions.RemoveEmptyEntries)
31-
.Where(l => !string.IsNullOrWhiteSpace(l))
32-
);
12+
var publicApi = ApiGenerator.GeneratePublicApi(typeof(Test).Assembly, excludeAttributes: new[] { "System.Runtime.Versioning.TargetFrameworkAttribute" });
13+
Approver.Verify(publicApi);
3314
}
34-
}
35-
#endif
15+
}

src/NServiceBus.Testing.Tests/APIApprovals.Approve.approved.txt renamed to src/NServiceBus.Testing.Tests/ApprovalFiles/APIApprovals.Approve.approved.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
[assembly: System.CLSCompliantAttribute(true)]
1+
[assembly: System.CLSCompliantAttribute(true)]
22
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
3-
[assembly: System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5.2", FrameworkDisplayName=".NET Framework 4.5.2")]
43
namespace NServiceBus.Testing
54
{
65
public class ExpectationException : System.Exception

src/NServiceBus.Testing.Tests/ApprovalTestConfig.cs

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/NServiceBus.Testing.Tests/NServiceBus.Testing.Tests.csproj

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>net452;netcoreapp2.0</TargetFrameworks>
5-
<Optimize>False</Optimize>
65
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
76
</PropertyGroup>
87

@@ -11,16 +10,12 @@
1110
</ItemGroup>
1211

1312
<ItemGroup>
14-
<PackageReference Include="ApprovalTests" Version="3.0.13" NoWarn="NU1701" />
15-
<PackageReference Include="ApprovalUtilities" Version="3.0.13" NoWarn="NU1701" />
16-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
1714
<PackageReference Include="NServiceBus" Version="7.0.0" />
18-
<PackageReference Include="NUnit" Version="3.7.1" />
19-
<PackageReference Include="NUnit3TestAdapter" Version="3.8.0-alpha1" />
20-
</ItemGroup>
21-
22-
<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
23-
<PackageReference Include="PublicApiGenerator" Version="6.4.0" />
15+
<PackageReference Include="NUnit" Version="3.11.0" />
16+
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
17+
<PackageReference Include="Particular.Approvals" Version="0.2.0" />
18+
<PackageReference Include="PublicApiGenerator" Version="8.1.0" />
2419
</ItemGroup>
2520

2621
</Project>

src/NServiceBus.Testing/NServiceBus.Testing.csproj

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,8 @@
1313
<PackageReference Include="NServiceBus" Version="[7.0.0, 8.0.0)" />
1414
<PackageReference Include="NServiceBus.Testing.Fakes.Sources" Version="7.0.0" PrivateAssets="All" />
1515
<PackageReference Include="Obsolete.Fody" Version="4.3.2" PrivateAssets="All" />
16-
<PackageReference Include="Particular.CodeRules" Version="0.2.0" PrivateAssets="All" />
17-
<PackageReference Include="Particular.Packaging" Version="0.1.0" PrivateAssets="All" />
18-
</ItemGroup>
19-
20-
<ItemGroup>
21-
<PackageReference Include="SourceLink.Create.GitHub" Version="2.5.0" PrivateAssets="All" />
22-
<DotNetCliToolReference Include="dotnet-sourcelink-git" Version="2.5.0" />
16+
<PackageReference Include="Particular.CodeRules" Version="0.2.1" PrivateAssets="All" />
17+
<PackageReference Include="Particular.Packaging" Version="0.2.1" PrivateAssets="All" />
2318
</ItemGroup>
2419

2520
</Project>

0 commit comments

Comments
 (0)