Esempio n. 1
0
        public void ProcessRequestData_FourShowsNoActiveShows_Processed()
        {
            // Arrange
            RequestDataProcessor processor = new RequestDataProcessor();
            int numActiveShows             = 0;
            int numTotalShows = 4;
            var data          = GetTestData(numActiveShows, numTotalShows);

            // Act
            var result = processor.ProcessRequestData(data).ToArray();

            // Assert
            Assert.AreEqual(numActiveShows, result.Length);
        }
Esempio n. 2
0
        public void ProcessRequestData_OneActiveShowCheckDataConsistency_Processed()
        {
            // Arrange
            RequestDataProcessor processor = new RequestDataProcessor();
            int numActiveShows             = 1;
            int numTotalShows = 1;
            var data          = GetTestData(numActiveShows, numTotalShows);

            // Act
            var result = processor.ProcessRequestData(data).Select(d => d as Show).ToArray();

            // Assert
            Assert.AreEqual("The slug", result[0].Slug);
            Assert.AreEqual("The title", result[0].Title);
            Assert.AreEqual("url image", result[0].Image);
        }