public void Copy_WithOneOfNamesIsInvalid_ShouldThrowException(string oldFileName, string newFileName)
        {
            // Act
            void Act() => _client.Copy(oldFileName, newFileName);

            // Assert
            Assert.Throws <InvalidNameException>(Act);
        }
Beispiel #2
0
        public void Copy_WithValidParameters_ShouldCallMove(string fromName, string toName)
        {
            // Arrange
            _entryRepositoryMock
            .Setup(r => r.Exists(fromName))
            .Returns(true);

            _fileRepositoryMock
            .Setup(r => r.Exists(fromName))
            .Returns(true);

            // Act
            _client.Copy(fromName, toName);

            // Assert
            _fileRepositoryMock.Verify(r => r.Copy(fromName, toName));
        }