示例#1
0
        public void StreamingContent_AddToQueue_ShouldSeeContentOnQueue()
        {
            // Arrange
            StreamingContentQueueRepository queueRepo = new StreamingContentQueueRepository();
            StreamingContent content = new StreamingContent("It", 3, GenreType.Horror, true, "PG", 6.5d);

            // Act
            queueRepo.AddToQueue(content);
            StreamingContent queueContent = queueRepo.PeekNextContent();

            // Assert
            Assert.AreSame(content, queueContent);
        }
示例#2
0
        public void StreamingContent_GetQueueCount_ShouldReturnCorrectInt()
        {
            // Arrange
            StreamingContentQueueRepository queueRepo = new StreamingContentQueueRepository();
            StreamingContent content = new StreamingContent("It", 3, GenreType.Horror, true, "PG", 6.5d);

            // Act
            queueRepo.AddToQueue(content);
            queueRepo.AddToQueue(content);
            queueRepo.AddToQueue(content);
            queueRepo.AddToQueue(content);

            var expected = 4;
            var actual   = queueRepo.GetQueueContentsCount();

            // Assert
            Assert.AreEqual(expected, actual);
        }