public unsafe void Dequeue_Item_After_Expanding_Success()
        {
            var expected = new TestStruct()
            {
                X = 3, Y = 1
            };

            ExpandableQueue <TestStruct> sut = stackalloc TestStruct[1];

            sut.Enqueue(new TestStruct()
            {
                X = 1, Y = 1
            });

            sut.Expand(stackalloc TestStruct[1]);

            sut.Enqueue(expected);

            sut.Dequeue();
            var testStruct = sut.Dequeue();

            Assert.AreEqual(0, sut.Count);

            Assert.AreEqual(expected.X, testStruct.X);
            Assert.AreEqual(expected.Y, testStruct.Y);
        }
        public unsafe void Enqueue_Item_Fail()
        {
            var expected = new TestStruct()
            {
                X = 3, Y = 1
            };

            ExpandableQueue <TestStruct> sut = stackalloc TestStruct[1];

            sut.Enqueue(expected);
            Assert.AreEqual(1, sut.Count);

            Assert.False(sut.Enqueue(expected));
            Assert.AreEqual(1, sut.Count);
        }
        public unsafe void Enqueue_Item_Success()
        {
            var expected = new TestStruct()
            {
                X = 3, Y = 1
            };

            ExpandableQueue <TestStruct> sut = stackalloc TestStruct[1];

            Assert.AreEqual(1, sut.Capacity);
            Assert.AreEqual(0, sut.Count);

            Assert.True(sut.Enqueue(expected));
            Assert.AreEqual(1, sut.Count);
        }
        public unsafe void Wrapping_Success()
        {
            ExpandableQueue <TestStruct> sut = stackalloc TestStruct[1];

            for (var i = 0; i < 20; i++)
            {
                var expected = new TestStruct()
                {
                    X = i, Y = i
                };
                sut.Enqueue(expected);

                ref var actual = ref sut.Dequeue();

                Assert.AreEqual(expected.X, actual.X);
                Assert.AreEqual(expected.Y, actual.Y);
            }
        public unsafe void Peek_Item_Success()
        {
            var expected = new TestStruct()
            {
                X = 3, Y = 1
            };

            ExpandableQueue <TestStruct> sut = stackalloc TestStruct[1];

            sut.Enqueue(expected);

            var testStruct = sut.Peek();

            Assert.AreEqual(1, sut.Count);

            Assert.AreEqual(3, testStruct.X);
            Assert.AreEqual(1, testStruct.Y);
        }