Пример #1
0
        public void GetNextFile_ShouldReturnNextFileAndReset()
        {
            //Arrange
            var response = new HttpResponseMock();

            response.Files = new List <string>
            {
                "1",
                "2",
                "3"
            };

            //Act/Assert
            Assert.AreEqual("1", response.GetNextFile());
            Assert.AreEqual("2", response.GetNextFile());
            Assert.AreEqual("3", response.GetNextFile());
            Assert.AreEqual("1", response.GetNextFile());
        }
Пример #2
0
        public void GetNextFile_ShouldThrowInvalidExceptionWhenFilesIsEmpty()
        {
            //Arrange
            var response = new HttpResponseMock();

            response.Files = new List <string>();

            //Act
            var ex = Assert.ThrowsException <InvalidOperationException>(() =>
            {
                response.GetNextFile();
            });
        }