Пример #1
0
        public void Should_Throw_InvalidOperationExceptiong_If_Processor_Queue_Is_Empty_And_Pop_Called()
        {
            var processor = new HybridFlowProcessor <int>();

            Action action = () => processor.Pop();

            action.Should().Throw <InvalidOperationException>();
        }
Пример #2
0
        public void Should_Pop_Item_From_The_Beginning_Of_Processing_Items_With_Mix_Add()
        {
            var processor = new HybridFlowProcessor <int>();

            processor.Enqueue(6);
            processor.Push(5);

            processor.Pop().Should().Be(5);
        }
Пример #3
0
        public void Should_Pop_Item_From_The_Top_Of_Processing_Items()
        {
            var processor = new HybridFlowProcessor <int>();

            processor.Push(5);
            processor.Push(6);

            var actualElement = processor.Pop();

            actualElement.Should().Be(6);
        }
Пример #4
0
        public void Should_Pop_Item_From_The_Beginning_Of_Processing_Items_With_Mix_Add()
        {
            // Arrange
            var processor = new HybridFlowProcessor <int>();

            processor.Enqueue(6);
            processor.Push(5);

            // Act
            var actualElement = processor.Pop();

            // Assert
            actualElement.Should()
            .Be(5);
        }