public void GlobalDeclarationsShouldBePrioritised()
        {
            declarations.Enqueue(declaration1);
            declarations.Enqueue(globalDeclaration);

            declarations.Prioritise();

            Assert.That(declarations.Dequeue(), Is.SameAs(globalDeclaration));
            Assert.That(declarations.Dequeue(), Is.SameAs(declaration1));
            Assert.That(declarations.Count, Is.EqualTo(0));
        }
Beispiel #2
0
        public void GlobalDeclarationsShouldBePrioritised()
        {
            declarations.Enqueue(declaration1);
            declarations.Enqueue(globalDeclaration);

            declarations.Prioritise();

            declarations.Dequeue().ShouldBeSameAs(globalDeclaration);
            declarations.Dequeue().ShouldBeSameAs(declaration1);
            declarations.Count.ShouldBe(0);
        }