示例#1
0
        public void GetFileContents_ThrowsExcption_WhenFileContentsEmpty()
        {
            // Arrange
            var filePath        = fixture.Create <string>();
            var fileContents    = string.Empty;
            var expectedMessage = "LISP file cannot be empty.";

            _fileServiceMock.Setup(s => s.GetContents(It.IsAny <string>())).ReturnsAsync(fileContents);

            // Act
            // Assert
            var exception = Assert.ThrowsAsync <ArgumentException>(() => _sut.GetFileContents(filePath));

            Assert.AreEqual(expectedMessage, exception.Message);
        }