Skip to content
Open
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
13 changes: 6 additions & 7 deletions src/core/Akka.TestKit.Tests/Akka.TestKit.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@
<Import Project="..\..\xunitSettings.props" />
<PropertyGroup>
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetTestVersion)</TargetFrameworks>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Akka\Akka.csproj" />
<ProjectReference Include="..\Akka.TestKit\Akka.TestKit.csproj" />
<ProjectReference Include="..\..\contrib\testkits\Akka.TestKit.Xunit2\Akka.TestKit.Xunit2.csproj" />
<ProjectReference Include="..\Akka.Tests.Shared.Internals\Akka.Tests.Shared.Internals.csproj" />
<ProjectReference Include="..\..\contrib\testkits\Akka.TestKit.Xunit\Akka.TestKit.Xunit.csproj" />
<ProjectReference Include="..\Akka.Tests.Shared.Internals.Xunit3\Akka.Tests.Shared.Internals.Xunit3.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
<PackageReference Include="xunit" Version="$(XunitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />
<PackageReference Include="xunit.v3" Version="$(Xunit3Version)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(Xunit3RunnerVersion)" />
<PackageReference Include="FluentAssertions" Version="5.10.3" />
</ItemGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
using Akka.Actor;
using FluentAssertions;
using Xunit;
using Xunit.Abstractions;
using static FluentAssertions.FluentActions;

namespace Akka.TestKit.Tests.TestActorRefTests
{
public class ExceptionHandling: TestKit.Xunit2.TestKit
public class ExceptionHandling: TestKit.Xunit.TestKit
{
private class GiveError
{ }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Threading.Tasks;
using Akka.Actor;
using Xunit;
using Xunit.Abstractions;

namespace Akka.TestKit.Tests.TestActorRefTests
{
Expand Down Expand Up @@ -46,7 +45,7 @@ async Task RunOneTestKit()
{
_output.WriteLine($"[{id}] Creating TestKit...");
// Create TestKit synchronously like a normal test would
using var testKit = new Akka.TestKit.Xunit2.TestKit($"test-{id}", output: _output);
using var testKit = new Akka.TestKit.Xunit.TestKit($"test-{id}", output: _output);
_output.WriteLine($"[{id}] TestKit created");

// Simulate what happens in Akka.Hosting - actor creation during startup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Akka.TestKit.Tests.TestEventListenerTests
{
public class ConfigTests : TestKit.Xunit2.TestKit
public class ConfigTests : TestKit.Xunit.TestKit
{
[Fact]
public void TestEventListener_is_in_config_by_default()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace Akka.TestKit.Tests.TestEventListenerTests
{
public abstract class EventFilterTestBase : TestKit.Xunit2.TestKit, IAsyncLifetime
public abstract class EventFilterTestBase : TestKit.Xunit.TestKit, IAsyncLifetime
{
/// <summary>
/// Used to signal that the test was successful and that we should ensure no more messages were logged
Expand All @@ -24,7 +24,7 @@ protected EventFilterTestBase(string config)
{
}

public async Task InitializeAsync()
public async ValueTask InitializeAsync()
{
//We send a ForwardAllEventsTo containing message to the TestEventListenerToForwarder logger (configured as a logger above).
//It should respond with an "OK" message when it has received the message.
Expand All @@ -40,9 +40,9 @@ await AwaitAssertAsync(async () =>
//From now on we know that all messages will be forwarded to TestActor
}

public Task DisposeAsync()
public ValueTask DisposeAsync()
{
return Task.CompletedTask;
return new ValueTask(Task.CompletedTask);
}

protected abstract void SendRawLogEventMessage(object message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Threading.Tasks;
using Akka.TestKit;
using Xunit;
using Xunit.Abstractions;

namespace Akka.Tests.TestKit
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace Akka.TestKit.Tests.TestKitBaseTests
{
public class AwaitAssertTests : TestKit.Xunit2.TestKit
public class AwaitAssertTests : TestKit.Xunit.TestKit
{
public AwaitAssertTests() : base("akka.test.timefactor=2")
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Akka.TestKit.Tests.Xunit2.TestKitBaseTests
{
public class RemainingTests : TestKit.Xunit2.TestKit
public class RemainingTests : TestKit.Xunit.TestKit
{
[Fact]
public void Throw_if_remaining_is_called_outside_Within()
Expand Down
7 changes: 3 additions & 4 deletions src/core/Akka.TestKit.Tests/TestKitSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using Akka.Actor.Dsl;
using Akka.Configuration;
using Xunit;
using Xunit.Abstractions;
using FluentAssertions;
using static FluentAssertions.FluentActions;

Expand All @@ -29,7 +28,7 @@ public void TestKitBaseTest()
{
using (var sys = ActorSystem.Create(nameof(TestKitSpec)))
{
var testkit = new TestKit.Xunit2.TestKit(sys, _output);
var testkit = new TestKit.Xunit.TestKit(sys, _output);
var echoActor = testkit.Sys.ActorOf(c => c.ReceiveAny((m, _) => testkit.TestActor.Tell(m)));
Invoking(() =>
{
Expand All @@ -43,9 +42,9 @@ public void TestKitBaseTest()
[Fact(DisplayName = "TestKit should accept ActorSystem with TestKit.DefaultConfig")]
public void TestKitConfigTest()
{
using (var sys = ActorSystem.Create(nameof(TestKitSpec), TestKit.Xunit2.TestKit.DefaultConfig))
using (var sys = ActorSystem.Create(nameof(TestKitSpec), TestKit.Xunit.TestKit.DefaultConfig))
{
var testkit = new TestKit.Xunit2.TestKit(sys, _output);
var testkit = new TestKit.Xunit.TestKit(sys, _output);
var echoActor = testkit.Sys.ActorOf(c => c.ReceiveAny((m, _) => testkit.TestActor.Tell(m)));
Invoking(() =>
{
Expand Down
4 changes: 2 additions & 2 deletions src/core/Akka.TestKit.Tests/TestKit_Config_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
namespace Akka.TestKit.Tests.Xunit2
{
// ReSharper disable once InconsistentNaming
public class TestKit_Config_Tests : TestKit.Xunit2.TestKit
public class TestKit_Config_Tests : TestKit.Xunit.TestKit
{
[Fact]
public void DefaultValues_should_be_correct()
Expand All @@ -33,7 +33,7 @@ public void DefaultValues_should_be_correct()
}
}

public class TestKitCustomConfigTests : TestKit.Xunit2.TestKit
public class TestKitCustomConfigTests : TestKit.Xunit.TestKit
{
private static readonly Config Config = """
akka.test {
Expand Down
Loading