test: consolidate capacity tests, add GameSystem edge cases, remove ShowcaseQueryTests
This commit is contained in:
@@ -1,55 +0,0 @@
|
||||
using GmRelay.Bot.Features.Sessions.CreateSession;
|
||||
using GmRelay.Shared.Domain;
|
||||
|
||||
namespace GmRelay.Bot.Tests.Web;
|
||||
|
||||
public sealed class ShowcaseQueryTests
|
||||
{
|
||||
[Fact]
|
||||
public void RegisterFromShowcase_WhenUnlimitedSeats_ShouldReturnActive()
|
||||
{
|
||||
var status = SessionCapacityRules.DecideJoinStatus(maxPlayers: null, activeParticipants: 5);
|
||||
|
||||
Assert.Equal(ParticipantRegistrationStatus.Active, status);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RegisterFromShowcase_WhenOneFreeSeat_ShouldReturnActive()
|
||||
{
|
||||
var status = SessionCapacityRules.DecideJoinStatus(maxPlayers: 4, activeParticipants: 3);
|
||||
|
||||
Assert.Equal(ParticipantRegistrationStatus.Active, status);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RegisterFromShowcase_WhenExactlyAtCapacity_ShouldReturnWaitlisted()
|
||||
{
|
||||
var status = SessionCapacityRules.DecideJoinStatus(maxPlayers: 4, activeParticipants: 4);
|
||||
|
||||
Assert.Equal(ParticipantRegistrationStatus.Waitlisted, status);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RegisterFromShowcase_WhenOverCapacity_ShouldReturnWaitlisted()
|
||||
{
|
||||
var status = SessionCapacityRules.DecideJoinStatus(maxPlayers: 3, activeParticipants: 5);
|
||||
|
||||
Assert.Equal(ParticipantRegistrationStatus.Waitlisted, status);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RegisterFromShowcase_WhenZeroActiveAndZeroMax_ShouldReturnWaitlisted()
|
||||
{
|
||||
var status = SessionCapacityRules.DecideJoinStatus(maxPlayers: 0, activeParticipants: 0);
|
||||
|
||||
Assert.Equal(ParticipantRegistrationStatus.Waitlisted, status);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RegisterFromShowcase_WhenZeroActiveAndPositiveMax_ShouldReturnActive()
|
||||
{
|
||||
var status = SessionCapacityRules.DecideJoinStatus(maxPlayers: 1, activeParticipants: 0);
|
||||
|
||||
Assert.Equal(ParticipantRegistrationStatus.Active, status);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user