Content-side integration tests.
Currently only tests that the server starts.
This commit is contained in:
27
Content.IntegrationTests/Content.IntegrationTests.csproj
Normal file
27
Content.IntegrationTests/Content.IntegrationTests.csproj
Normal file
@@ -0,0 +1,27 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net472</TargetFramework>
|
||||
<OutputPath>..\bin\Content.IntegrationTests\</OutputPath>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NUnit" Version="3.11.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Content.Client\Content.Client.csproj" />
|
||||
<ProjectReference Include="..\Content.Server\Content.Server.csproj" />
|
||||
<ProjectReference Include="..\Content.Shared\Content.Shared.csproj" />
|
||||
<ProjectReference Include="..\Content.Tests\Content.Tests.csproj" />
|
||||
<ProjectReference Include="..\RobustToolbox\Robust.Client\Robust.Client.csproj" />
|
||||
<ProjectReference Include="..\RobustToolbox\Robust.Server\Robust.Server.csproj" />
|
||||
<ProjectReference Include="..\RobustToolbox\Robust.Shared.Maths\Robust.Shared.Maths.csproj" />
|
||||
<ProjectReference Include="..\RobustToolbox\Robust.Shared\Robust.Shared.csproj" />
|
||||
<ProjectReference Include="..\RobustToolbox\Robust.UnitTesting\Robust.UnitTesting.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
33
Content.IntegrationTests/StartTest.cs
Normal file
33
Content.IntegrationTests/StartTest.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using NUnit.Framework;
|
||||
using Robust.Shared.Exceptions;
|
||||
using Robust.Shared.Utility;
|
||||
using Robust.UnitTesting;
|
||||
|
||||
namespace Content.IntegrationTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class StartTest : RobustIntegrationTest
|
||||
{
|
||||
/// <summary>
|
||||
/// Test that the server starts.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public async Task TestServerStart()
|
||||
{
|
||||
var server = StartServer();
|
||||
await server.WaitIdleAsync();
|
||||
Assert.That(server.IsAlive);
|
||||
server.RunTicks(5);
|
||||
await server.WaitIdleAsync();
|
||||
Assert.That(server.IsAlive);
|
||||
var runtimeLog = server.ResolveDependency<IRuntimeLog>();
|
||||
Assert.That(runtimeLog.ExceptionCount, Is.EqualTo(0), "No exceptions must be logged.");
|
||||
server.Stop();
|
||||
await server.WaitIdleAsync();
|
||||
Assert.That(!server.IsAlive);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user