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;
|
if (next is { } s) d.Step = s;
|
||||||
}
|
}
|
||||||
private static string? SetSystem(WizardPayload p, string? v) { p.System = v; return null; }
|
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)
|
private static string? SetScheduledAt(WizardPayload p, DateTimeOffset v)
|
||||||
{ p.Single ??= new WizardSingleInput(); p.Single.ScheduledAt = v; return null; }
|
{ p.Single ??= new WizardSingleInput(); p.Single.ScheduledAt = v; return null; }
|
||||||
private static string? SetMaxPlayers(WizardPayload p, int v)
|
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.Duration => new WizardPayload { Type = WizardCreationType.Single, Title = "T", System = "Dnd5e" },
|
||||||
WizardStepNames.Capacity => new WizardPayload
|
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) },
|
Single = new WizardSingleInput { ScheduledAt = DateTimeOffset.UtcNow.AddDays(1) },
|
||||||
},
|
},
|
||||||
WizardStepNames.Visibility => new WizardPayload
|
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
|
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,
|
Visibility = WizardVisibility.Club,
|
||||||
},
|
},
|
||||||
WizardStepNames.Publish => new WizardPayload
|
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,
|
Visibility = WizardVisibility.Public,
|
||||||
},
|
},
|
||||||
WizardStepNames.Confirm => new WizardPayload
|
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,
|
Visibility = WizardVisibility.Public,
|
||||||
},
|
},
|
||||||
_ => new WizardPayload(),
|
_ => new WizardPayload(),
|
||||||
|
|||||||
+4
-1
@@ -124,7 +124,10 @@ public sealed class GameCreationWizardValidationTests
|
|||||||
var draft = NewDraft(WizardStepNames.Capacity,
|
var draft = NewDraft(WizardStepNames.Capacity,
|
||||||
new WizardPayload
|
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) },
|
Single = new WizardSingleInput { ScheduledAt = DateTimeOffset.UtcNow.AddDays(1) },
|
||||||
});
|
});
|
||||||
drafts.Seed(draft);
|
drafts.Seed(draft);
|
||||||
|
|||||||
Reference in New Issue
Block a user