public async Task Should_Throw_If_Path_Is_Null() { // Given var commands = new GitHubActionsCommandsFixture().CreateGitHubActionsCommands(); var artifactName = "artifactName"; // When var result = await Record.ExceptionAsync(() => commands.DownloadArtifact(artifactName, null)); // Then AssertEx.IsArgumentNullException(result, "path"); }
public async Task Should_Throw_If_ArtifactName_Is_Null() { // Given var commands = new GitHubActionsCommandsFixture().CreateGitHubActionsCommands(); var path = DirectoryPath.FromString("/artifacts"); // When var result = await Record.ExceptionAsync(() => commands.DownloadArtifact(null, path)); // Then AssertEx.IsArgumentNullException(result, "artifactName"); }
public async Task Should_Throw_If_Directory_Missing() { // Given var commands = new GitHubActionsCommandsFixture().CreateGitHubActionsCommands(); var path = DirectoryPath.FromString("/artifacts"); var artifactName = "artifact"; // When var result = await Record.ExceptionAsync(() => commands.DownloadArtifact(artifactName, path)); // Then AssertEx.IsExceptionWithMessage <DirectoryNotFoundException>(result, "Local directory /artifacts not found."); }