style: dotnet format pass on wizard code
This commit is contained in:
@@ -394,7 +394,7 @@ public sealed class GameCreationWizard
|
||||
if (next is { } s) d.Step = s;
|
||||
}
|
||||
private static string? SetSystem(WizardPayload p, string? v) { p.System = v; return null; }
|
||||
private static string? SetDurationMinutes(WizardPayload p, int? v){ p.DurationMinutes = v; return null; }
|
||||
private static string? SetDurationMinutes(WizardPayload p, int? v) { p.DurationMinutes = v; return null; }
|
||||
private static string? SetScheduledAt(WizardPayload p, DateTimeOffset v)
|
||||
{ p.Single ??= new WizardSingleInput(); p.Single.ScheduledAt = v; return null; }
|
||||
private static string? SetMaxPlayers(WizardPayload p, int v)
|
||||
|
||||
+20
-5
@@ -149,26 +149,41 @@ public sealed class GameCreationWizardStepTransitionsTests
|
||||
WizardStepNames.Duration => new WizardPayload { Type = WizardCreationType.Single, Title = "T", System = "Dnd5e" },
|
||||
WizardStepNames.Capacity => new WizardPayload
|
||||
{
|
||||
Type = WizardCreationType.Single, Title = "T", System = "Dnd5e", DurationMinutes = 240,
|
||||
Type = WizardCreationType.Single,
|
||||
Title = "T",
|
||||
System = "Dnd5e",
|
||||
DurationMinutes = 240,
|
||||
Single = new WizardSingleInput { ScheduledAt = DateTimeOffset.UtcNow.AddDays(1) },
|
||||
},
|
||||
WizardStepNames.Visibility => new WizardPayload
|
||||
{
|
||||
Type = WizardCreationType.Single, Title = "T", System = "Dnd5e", DurationMinutes = 240,
|
||||
Type = WizardCreationType.Single,
|
||||
Title = "T",
|
||||
System = "Dnd5e",
|
||||
DurationMinutes = 240,
|
||||
},
|
||||
WizardStepNames.PickClub => new WizardPayload
|
||||
{
|
||||
Type = WizardCreationType.Single, Title = "T", System = "Dnd5e", DurationMinutes = 240,
|
||||
Type = WizardCreationType.Single,
|
||||
Title = "T",
|
||||
System = "Dnd5e",
|
||||
DurationMinutes = 240,
|
||||
Visibility = WizardVisibility.Club,
|
||||
},
|
||||
WizardStepNames.Publish => new WizardPayload
|
||||
{
|
||||
Type = WizardCreationType.Single, Title = "T", System = "Dnd5e", DurationMinutes = 240,
|
||||
Type = WizardCreationType.Single,
|
||||
Title = "T",
|
||||
System = "Dnd5e",
|
||||
DurationMinutes = 240,
|
||||
Visibility = WizardVisibility.Public,
|
||||
},
|
||||
WizardStepNames.Confirm => new WizardPayload
|
||||
{
|
||||
Type = WizardCreationType.Single, Title = "T", System = "Dnd5e", DurationMinutes = 240,
|
||||
Type = WizardCreationType.Single,
|
||||
Title = "T",
|
||||
System = "Dnd5e",
|
||||
DurationMinutes = 240,
|
||||
Visibility = WizardVisibility.Public,
|
||||
},
|
||||
_ => new WizardPayload(),
|
||||
|
||||
+4
-1
@@ -124,7 +124,10 @@ public sealed class GameCreationWizardValidationTests
|
||||
var draft = NewDraft(WizardStepNames.Capacity,
|
||||
new WizardPayload
|
||||
{
|
||||
Type = WizardCreationType.Single, Title = "T", System = "Dnd5e", DurationMinutes = 240,
|
||||
Type = WizardCreationType.Single,
|
||||
Title = "T",
|
||||
System = "Dnd5e",
|
||||
DurationMinutes = 240,
|
||||
Single = new WizardSingleInput { ScheduledAt = DateTimeOffset.UtcNow.AddDays(1) },
|
||||
});
|
||||
drafts.Seed(draft);
|
||||
|
||||
Reference in New Issue
Block a user