예제 #1
0
            public void Should_Throw_If_Key_Is_Null()
            {
                // Given
                var commands = new GitHubActionsCommandsFixture().CreateGitHubActionsCommands();

                // When
                var result = Record.Exception(() => commands.SetEnvironmentVariable(null, null));

                // Then
                AssertEx.IsArgumentNullException(result, "key");
            }
예제 #2
0
            public void Should_Throw_If_EnvPath_Is_Null()
            {
                // Given
                var commands = new GitHubActionsCommandsFixture()
                               .WithNoGitHubEnv()
                               .CreateGitHubActionsCommands();

                var key   = "Key";
                var value = "Value";

                // When
                var result = Record.Exception(() => commands.SetEnvironmentVariable(key, value));

                // Then
                AssertEx.IsCakeException(result, "GitHub Actions Runtime EnvPath missing.");
            }