43 lines
1.4 KiB
C#
43 lines
1.4 KiB
C#
using AcDream.Core.World;
|
|
using Xunit;
|
|
|
|
namespace AcDream.Core.Tests.World;
|
|
|
|
public sealed class TeleportAnimSequencerTests
|
|
{
|
|
// --- Task 1.1: type presence ---
|
|
|
|
[Fact]
|
|
public void Enums_HaveExpectedValues()
|
|
{
|
|
Assert.Equal(0, (int)TeleportAnimState.Off);
|
|
Assert.Equal(1, (int)TeleportAnimState.WorldFadeOut);
|
|
Assert.Equal(2, (int)TeleportAnimState.TunnelFadeIn);
|
|
Assert.Equal(3, (int)TeleportAnimState.Tunnel);
|
|
Assert.Equal(4, (int)TeleportAnimState.TunnelContinue);
|
|
Assert.Equal(5, (int)TeleportAnimState.TunnelFadeOut);
|
|
Assert.Equal(6, (int)TeleportAnimState.WorldFadeIn);
|
|
|
|
_ = TeleportEntryKind.Portal;
|
|
_ = TeleportEntryKind.Login;
|
|
_ = TeleportEntryKind.Death;
|
|
_ = TeleportEntryKind.Logout;
|
|
|
|
_ = TeleportAnimEvent.PlayEnterSound;
|
|
_ = TeleportAnimEvent.PlayExitSound;
|
|
_ = TeleportAnimEvent.Place;
|
|
_ = TeleportAnimEvent.FireLoginComplete;
|
|
_ = TeleportAnimEvent.EnterTunnel;
|
|
}
|
|
|
|
[Fact]
|
|
public void Snapshot_DefaultsAreOff_ClearAlpha()
|
|
{
|
|
var snap = new TeleportAnimSnapshot(
|
|
TeleportAnimState.Off, FadeAlpha: 0f, ShowTunnel: false, ShowPleaseWait: false);
|
|
Assert.Equal(TeleportAnimState.Off, snap.State);
|
|
Assert.Equal(0f, snap.FadeAlpha);
|
|
Assert.False(snap.ShowTunnel);
|
|
Assert.False(snap.ShowPleaseWait);
|
|
}
|
|
}
|