< Summary

Information
Class: Orchestrator.Commands.Utility.UploadContext.UploadContextSettings
Assembly: Orchestrator
File(s): /home/runner/work/KicktippAi/KicktippAi/src/Orchestrator/Commands/Utility/UploadContext/UploadContextSettings.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 33
Line coverage: 100%
Branch coverage
50%
Covered branches: 1
Total branches: 2
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%11100%
Validate()50%22100%

File(s)

/home/runner/work/KicktippAi/KicktippAi/src/Orchestrator/Commands/Utility/UploadContext/UploadContextSettings.cs

#LineLine coverage
 1using System.ComponentModel;
 2using Spectre.Console;
 3using Spectre.Console.Cli;
 4
 5namespace Orchestrator.Commands.Utility.UploadContext;
 6
 7public sealed class UploadContextSettings : CommandSettings
 8{
 9    [CommandOption("--input <PATH>")]
 10    [Description("Path to a context document JSON file with documentName, content, and communityContext")]
 111    public string Input { get; set; } = string.Empty;
 12
 13    [CommandOption("--competition <COMPETITION>")]
 14    [Description("Competition identifier (defaults from the JSON community context)")]
 15    public string? Competition { get; set; }
 16
 17    [CommandOption("--dry-run")]
 18    [Description("Validate and show the upload without writing Firestore documents")]
 19    [DefaultValue(false)]
 20    public bool DryRun { get; set; }
 21
 22    [CommandOption("-v|--verbose")]
 23    [Description("Enable verbose output")]
 24    [DefaultValue(false)]
 25    public bool Verbose { get; set; }
 26
 27    public override ValidationResult Validate()
 28    {
 129        return string.IsNullOrWhiteSpace(Input)
 130            ? ValidationResult.Error("--input is required")
 131            : ValidationResult.Success();
 32    }
 33}

Methods/Properties

.ctor()
Validate()