Example #1
0
        public async Task RefreshEvent_DoesNothing_NoEvent()
        {
            var rand  = new Random(1234);
            var queue = new TestQueue();

            for (ulong i = 0; i < 1000; i++)
            {
                var nextRole = rand.Next(0, 3) switch
                {
                    0 => FFXIVRole.DPS,
                    1 => FFXIVRole.Healer,
                    2 => FFXIVRole.Tank,
                    _ => throw new NotImplementedException(),
                };
                queue.Enqueue(i, nextRole, null);
                await Task.Delay(rand.Next(1, 20));
            }
            queue.RefreshEvent(EventId);
            var timestamps = queue.GetAllSlots()
                             .ToList();
            var firstTimestamp = timestamps.First().QueueTime;

            foreach (var slot in timestamps.Skip(1))
            {
                Assert.AreNotEqual(firstTimestamp, slot.QueueTime);
            }
        }