Ejemplo n.º 1
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.UploadArtifact(path, null));

                    // Then
                    AssertEx.IsArgumentNullException(result, "artifactName");
                }
Ejemplo n.º 2
0
                public async Task Should_Throw_If_Path_Is_Null()
                {
                    // Given
                    var           commands = new GitHubActionsCommandsFixture().CreateGitHubActionsCommands();
                    DirectoryPath path     = null;

                    // When
                    var result = await Record.ExceptionAsync(() => commands.UploadArtifact(path, null));

                    // Then
                    AssertEx.IsArgumentNullException(result, "path");
                }
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.UploadArtifact(path, artifactName));

                    // Then
                    AssertEx.IsExceptionWithMessage <DirectoryNotFoundException>(result, "Artifact directory /artifacts not found.");
                }