Content-side integration tests.
Currently only tests that the server starts.
This commit is contained in:
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