Ejemplo n.º 1
0
            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");
            }
Ejemplo n.º 2
0
            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");
            }
Ejemplo n.º 3
0
            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.");
            }