feat(auth): add Dev-only always-valid ISteamServer for local no-Steam clients
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
25
SVSim.UnitTests/Services/DevAlwaysValidSteamServerTests.cs
Normal file
25
SVSim.UnitTests/Services/DevAlwaysValidSteamServerTests.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using Microsoft.Extensions.Logging.Abstractions;
|
||||
using NUnit.Framework;
|
||||
using SVSim.EmulatedEntrypoint.Services;
|
||||
|
||||
namespace SVSim.UnitTests.Services;
|
||||
|
||||
[TestFixture]
|
||||
public class DevAlwaysValidSteamServerTests
|
||||
{
|
||||
[Test]
|
||||
public void BeginAuthSession_accepts_any_ticket_for_any_steamId()
|
||||
{
|
||||
var sut = new DevAlwaysValidSteamServer(NullLogger<DevAlwaysValidSteamServer>.Instance);
|
||||
|
||||
Assert.That(sut.BeginAuthSession(new byte[] { 0xDE, 0xAD }, 900001UL), Is.True);
|
||||
Assert.That(sut.BeginAuthSession(System.Array.Empty<byte>(), 0UL), Is.True);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Lifecycle_methods_do_not_throw()
|
||||
{
|
||||
var sut = new DevAlwaysValidSteamServer(NullLogger<DevAlwaysValidSteamServer>.Instance);
|
||||
Assert.DoesNotThrow(() => { sut.Initialize(453480); sut.EndSession(900001UL); sut.Shutdown(); });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user