public void Delete_WhenNameIsRootDirectory_ShouldThrowException() { // Arrange _entryRepositoryMock .Setup(r => r.Exists(PathConstants.RootDirectoryName)) .Returns(true); // Act void Act() => _client.Delete(PathConstants.RootDirectoryName); // Assert Assert.Throws <ArgumentNonValidException>(Act); }
public void Delete_WithValidParameters_ShouldDeleteFile(string fileName) { // Arrange _entryRepositoryMock .Setup(r => r.Exists(fileName)) .Returns(true); // Act _client.Delete(fileName); // Assert _entryRepositoryMock.Verify(r => r.Delete(fileName)); }