public void Given_raw_key_Then_item_not_found()
        {
            var sut = new PendingTasksQueue();

            var result = sut.FirstOrDefaultByRawKey("foo");

            Assert.Null(result);
        }
        public void Given_raw_key_Then_item_found()
        {
            var request = new Mock <IImageLoaderTask>();

            request.Setup(r => r.KeyRaw).Returns("foo");
            var request2 = new Mock <IImageLoaderTask>();

            request2.Setup(r => r.KeyRaw).Returns("bar");
            var sut = new PendingTasksQueue();

            sut.Enqueue(request.Object, 0);
            sut.Enqueue(request2.Object, 0);

            var result = sut.FirstOrDefaultByRawKey("foo");

            Assert.Equal(request.Object, result);
        }