Skip to content

Commit 6495d3b

Browse files
committed
Adapt to breaking change in Spectre
1 parent 62cd32f commit 6495d3b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/DependencyInjection.Tests/Regressions.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
2+
using System.Threading;
63
using Microsoft.Extensions.DependencyInjection;
74
using Moq;
85
using Spectre.Console.Cli;
@@ -22,7 +19,7 @@ public void CovariantRegistrationSatisfiesIntefaceConstraints()
2219
var command = provider.GetRequiredService<MyCommand>();
2320

2421
Assert.Equal(0, command.Execute(new CommandContext([], Mock.Of<IRemainingArguments>(), "my", null),
25-
new MySetting { Base = "", Name = "" }));
22+
new MySetting { Base = "", Name = "" }, default));
2623
}
2724
}
2825

@@ -47,7 +44,7 @@ public class MyCommand : BaseCommand<MySetting> { }
4744

4845
public abstract class BaseCommand<TSettings> : Command<TSettings> where TSettings : BaseSetting, ISetting
4946
{
50-
public override int Execute(CommandContext context, TSettings settings)
47+
public override int Execute(CommandContext context, TSettings settings, CancellationToken cancellationToken)
5148
{
5249
Console.WriteLine($"Base: {settings.Base}, Name: {settings.Name}");
5350
return 0;

0 commit comments

Comments
 (0)