Skip to content

Commit

Permalink
Prepare repo for .NET 8 (#555)
Browse files Browse the repository at this point in the history
* Bump to core v9

* Update .github/workflows/ci.yml

Co-authored-by: Dan Kent <[email protected]>

* Remove range

---------

Co-authored-by: Dan Kent <[email protected]>
  • Loading branch information
andreasohlund and kentdr authored Aug 22, 2023
1 parent 77f90d1 commit 5aaff48
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 149 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
strategy:
matrix:
include:
- os: windows-2019
- os: windows-2022
name: Windows
- os: ubuntu-20.04
- os: ubuntu-22.04
name: Linux
fail-fast: false
steps:
Expand All @@ -28,9 +28,8 @@ jobs:
- name: Setup .NET SDK
uses: actions/[email protected]
with:
dotnet-version: |
7.0.x
6.0.x
dotnet-version: 8.0.x
dotnet-quality: 'preview'
- name: Build
run: dotnet build src --configuration Release
- name: Upload packages
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
- name: Setup .NET SDK
uses: actions/[email protected]
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x
dotnet-quality: 'preview'
- name: Build
run: dotnet build src --configuration Release
- name: Sign NuGet packages
Expand Down
2 changes: 1 addition & 1 deletion src/Custom.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<MinVerMinimumMajorMinor>8.1</MinVerMinimumMajorMinor>
<MinVerMinimumMajorMinor>9.0</MinVerMinimumMajorMinor>
<MinVerAutoIncrement>minor</MinVerAutoIncrement>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@
[assembly: System.Runtime.InteropServices.ComVisible(false)]
namespace NServiceBus.Testing
{
[System.Obsolete("Use the arrange act assert (AAA) syntax instead. Please see the upgrade guide for" +
" more details. Will be removed in version 9.0.0.", true)]
public class ExpectationException : System.Exception
{
public ExpectationException() { }
}
[System.Obsolete("Use the arrange act assert (AAA) syntax instead. Please see the upgrade guide for" +
" more details. Will be removed in version 9.0.0.", true)]
public class Handler<T>
{
public Handler() { }
}
public static class OutgoingMessageExtensions
{
public static System.Collections.Generic.IEnumerable<NServiceBus.Testing.PublishedMessage<TMessage>> Containing<TMessage>(this System.Collections.Generic.IEnumerable<NServiceBus.Testing.PublishedMessage<object>> publishedMessages) { }
Expand Down Expand Up @@ -48,12 +36,6 @@ namespace NServiceBus.Testing
{
public RepliedMessage(TMessage message, NServiceBus.ReplyOptions options) { }
}
[System.Obsolete("Use the arrange act assert (AAA) syntax instead. Please see the upgrade guide for" +
" more details. Will be removed in version 9.0.0.", true)]
public class Saga<T>
{
public Saga() { }
}
public class SentMessage<TMessage> : NServiceBus.Testing.OutgoingMessage<TMessage, NServiceBus.SendOptions>
{
public SentMessage(TMessage message, NServiceBus.SendOptions options) { }
Expand All @@ -62,24 +44,15 @@ namespace NServiceBus.Testing
{
public Subscription(System.Type message, NServiceBus.SubscribeOptions options) { }
}
[System.Obsolete("Use the arrange act assert (AAA) syntax instead. Please see the upgrade guide for" +
" more details. Will be removed in version 9.0.0.", true)]
public class Test
{
public Test() { }
}
public class TestableAuditContext : NServiceBus.Testing.TestableBehaviorContext, NServiceBus.Extensibility.IExtendable, NServiceBus.ICancellableContext, NServiceBus.Pipeline.IAuditActionContext, NServiceBus.Pipeline.IAuditContext, NServiceBus.Pipeline.IBehaviorContext
{
public TestableAuditContext() { }
[System.Obsolete("Use `AuditMetadata` instead. Will be removed in version 9.0.0.", true)]
public System.Collections.Generic.Dictionary<string, string> AddedAuditData { get; }
public NServiceBus.Audit.AuditAction AuditAction { get; set; }
public string AuditAddress { get; set; }
public System.Collections.Generic.Dictionary<string, string> AuditMetadata { get; set; }
public bool IsLocked { get; }
public NServiceBus.Transport.OutgoingMessage Message { get; set; }
public System.TimeSpan? TimeToBeReceived { get; }
[System.Obsolete("Use `AuditMetadata` instead. Will be removed in version 9.0.0.", true)]
public void AddAuditData(string key, string value) { }
public NServiceBus.Pipeline.IAuditActionContext PreventChanges() { }
}
Expand Down Expand Up @@ -107,12 +80,6 @@ namespace NServiceBus.Testing
public bool EndpointStopped { get; }
public virtual System.Threading.Tasks.Task Stop(System.Threading.CancellationToken cancellationToken = default) { }
}
[System.Obsolete("Forwarding functionality has been removed from NServiceBus. Will be removed in ve" +
"rsion 9.0.0.", true)]
public class TestableForwardingContext
{
public TestableForwardingContext() { }
}
public abstract class TestableIncomingContext : NServiceBus.Testing.TestableMessageProcessingContext, NServiceBus.Extensibility.IExtendable, NServiceBus.ICancellableContext, NServiceBus.IMessageProcessingContext, NServiceBus.IPipelineContext, NServiceBus.Pipeline.IBehaviorContext, NServiceBus.Pipeline.IIncomingContext
{
protected TestableIncomingContext(NServiceBus.IMessageCreator messageCreator = null) { }
Expand Down Expand Up @@ -165,9 +132,6 @@ namespace NServiceBus.Testing
{
protected NServiceBus.IMessageCreator messageCreator;
public TestableMessageSession(NServiceBus.IMessageCreator messageCreator = null) { }
[System.Obsolete("The member currently throws a NotImplementedException. Will be removed in version" +
" 9.0.0.", true)]
public NServiceBus.Extensibility.ContextBag Extensions { get; set; }
public virtual NServiceBus.Testing.PublishedMessage<object>[] PublishedMessages { get; }
public virtual NServiceBus.Testing.SentMessage<object>[] SentMessages { get; }
public virtual NServiceBus.Testing.Subscription[] Subscriptions { get; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;net6.0;net7.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -10,8 +10,8 @@

<ItemGroup>
<PackageReference Include="GitHubActionsTestLogger" Version="2.3.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageReference Include="NServiceBus" Version="8.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0-preview-23371-04" />
<PackageReference Include="NServiceBus" Version="9.0.0-alpha.1" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Particular.Approvals" Version="0.5.0" />
Expand Down
2 changes: 2 additions & 0 deletions src/NServiceBus.Testing.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NServiceBus.Testing.Tests",
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B483C1D9-DDB1-484B-A1AC-2CFB6C8993F3}"
ProjectSection(SolutionItems) = preProject
..\.github\workflows\ci.yml = ..\.github\workflows\ci.yml
Custom.Build.props = Custom.Build.props
..\.github\workflows\release.yml = ..\.github\workflows\release.yml
EndProjectSection
EndProject
Global
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ public partial class TestableAuditContext : TestableBehaviorContext, IAuditConte
/// </summary>
public Dictionary<string, string> AuditMetadata { get; set; } = new Dictionary<string, string>();

/// <summary>
/// This method is being removed from IAuditContext, so this stub method remains until the removal is done in v10.
/// </summary>
public void AddAuditData(string key, string value) => throw new NotImplementedException();

/// <summary>
/// Gets the messages, if any, this audit operation should result in.
/// </summary>
Expand Down
6 changes: 3 additions & 3 deletions src/NServiceBus.Testing/NServiceBus.Testing.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(SolutionDir)NServiceBus.snk</AssemblyOriginatorKeyFile>
<Description>A testing framework for NServiceBus</Description>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Fody" Version="6.7.0" PrivateAssets="All" />
<PackageReference Include="NServiceBus" Version="[8.0.3, 9)" />
<PackageReference Include="Fody" Version="6.8.0" PrivateAssets="All" />
<PackageReference Include="NServiceBus" Version="9.0.0-alpha.1" />
<PackageReference Include="Obsolete.Fody" Version="5.3.0" PrivateAssets="All" />
<PackageReference Include="Particular.Packaging" Version="3.0.0" PrivateAssets="All" />
</ItemGroup>
Expand Down
100 changes: 0 additions & 100 deletions src/NServiceBus.Testing/obsoletes.cs

This file was deleted.

0 comments on commit 5aaff48

Please sign in to comment.