Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PackageVersion Include="FluentAssertions" Version="8.11.0" />
<PackageVersion Include="LanguageExt.Core" Version="4.4.9" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="5.9.0" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="7.1.0" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="7.1.1" />
<PackageVersion Include="Microsoft.Data.SQLite" Version="10.0.12" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="10.0.12" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="10.0.12" />
Expand All @@ -21,14 +21,14 @@
<PackageVersion Include="Microsoft.Extensions.FileProviders.Embedded" Version="10.0.12" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.10.1" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="10.0.401" />
<PackageVersion Include="Microsoft.SqlServer.TransactSql.ScriptDom" Version="180.107.0" />
<PackageVersion Include="Microsoft.SqlServer.TransactSql.ScriptDom" Version="180.117.0" />
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.11.2" />
<PackageVersion Include="Microsoft.Testing.Platform" Version="2.4.1" />
<PackageVersion Include="Moq" Version="4.20.72" />
<PackageVersion Include="Moq" Version="4.21.0" />
<PackageVersion Include="MySqlConnector" Version="2.6.2" />
<PackageVersion Include="Nito.AsyncEx" Version="5.1.2" />
<PackageVersion Include="Npgsql" Version="10.0.3" />
<PackageVersion Include="NUnit" Version="4.6.1" />
<PackageVersion Include="NUnit" Version="5.0.0" />
<PackageVersion Include="NUnit.Analyzers" Version="4.15.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="6.3.0" />
<PackageVersion Include="Oracle.ManagedDataAccess.Core" Version="23.26.301" />
Expand All @@ -37,13 +37,13 @@
<PackageVersion Include="QuikGraph" Version="2.5.0" />
<PackageVersion Include="Roslyn.System.IO.Abstractions.Analyzers" Version="12.2.19" />
<PackageVersion Include="Roslynator.Analyzers" Version="5.0.0" />
<PackageVersion Include="ServiceStack.OrmLite" Version="10.2.0" />
<PackageVersion Include="ServiceStack.OrmLite" Version="10.3.0" />
<PackageVersion Include="Spectre.Console.Analyzer" Version="1.0.0" />
<PackageVersion Include="Spectre.Console.Cli" Version="0.55.0" />
<PackageVersion Include="Spectre.Console.Cli.Extensions.DependencyInjection" Version="0.29.0" />
<PackageVersion Include="Spectre.Console.Cli" Version="0.57.2" />
<PackageVersion Include="Spectre.Console.Cli.Extensions.DependencyInjection" Version="0.30.0" />
<PackageVersion Include="SQLitePCLRaw.bundle_e_sqlite3" Version="3.0.5" />
<PackageVersion Include="System.IO.Abstractions" Version="22.2.0" />
<PackageVersion Include="System.IO.Abstractions.TestingHelpers" Version="22.2.0" />
<PackageVersion Include="System.IO.Abstractions" Version="22.3.0" />
<PackageVersion Include="System.IO.Abstractions.TestingHelpers" Version="22.3.0" />
<PackageVersion Include="System.IO.Hashing" Version="10.0.12" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ public static void RunAllAsync_GivenCancellationDuringRun_PropagatesOperationCan
}

[Test]
public static void RunAllAsync_GivenSingleFailingItem_ThrowsAggregateExceptionWithSingularMessage()
public static async Task RunAllAsync_GivenSingleFailingItem_ThrowsAggregateExceptionWithSingularMessage()
{
var items = new[] { "a" };

var ex = Assert.ThrowsAsync<AggregateException>(() => RenderTaskRunner.RunAllAsync(
var ex = await Assert.ThrowsAsync<AggregateException>(() => RenderTaskRunner.RunAllAsync(
items,
static s => s,
static (_, _) => throw new InvalidOperationException("boom"),
Expand All @@ -146,11 +146,11 @@ public static void RunAllAsync_GivenSingleFailingItem_ThrowsAggregateExceptionWi
}

[Test]
public static void RunAllAsync_GivenMultipleFailingItems_ThrowsAggregateExceptionWithPluralMessageOrderedByLabel()
public static async Task RunAllAsync_GivenMultipleFailingItems_ThrowsAggregateExceptionWithPluralMessageOrderedByLabel()
{
var items = new[] { "charlie", "alpha", "bravo" };

var ex = Assert.ThrowsAsync<AggregateException>(() => RenderTaskRunner.RunAllAsync(
var ex = await Assert.ThrowsAsync<AggregateException>(() => RenderTaskRunner.RunAllAsync(
items,
static s => s,
static (item, _) => throw new InvalidOperationException($"failure for {item}"),
Expand All @@ -166,11 +166,11 @@ public static void RunAllAsync_GivenMultipleFailingItems_ThrowsAggregateExceptio
}

[Test]
public static void RunAllAsync_GivenSuccessAndFailureItems_OnlyFailingItemsAreReported()
public static async Task RunAllAsync_GivenSuccessAndFailureItems_OnlyFailingItemsAreReported()
{
var items = new[] { "good", "bad" };

var ex = Assert.ThrowsAsync<AggregateException>(() => RenderTaskRunner.RunAllAsync(
var ex = await Assert.ThrowsAsync<AggregateException>(() => RenderTaskRunner.RunAllAsync(
items,
static s => s,
static (item, _) => item == "bad"
Expand All @@ -183,13 +183,13 @@ public static void RunAllAsync_GivenSuccessAndFailureItems_OnlyFailingItemsAreRe
}

[Test]
public static void RunAllAsync_GivenCancelledToken_PropagatesOperationCanceledExceptionInsteadOfFailure()
public static async Task RunAllAsync_GivenCancelledToken_PropagatesOperationCanceledExceptionInsteadOfFailure()
{
using var cts = new CancellationTokenSource();
cts.Cancel();
var items = new[] { "a" };

Assert.ThrowsAsync(Is.InstanceOf<OperationCanceledException>(), () => RenderTaskRunner.RunAllAsync(
await Assert.ThrowsAsync(Is.InstanceOf<OperationCanceledException>(), () => RenderTaskRunner.RunAllAsync(
items,
static s => s,
(_, ct) =>
Expand Down
2 changes: 1 addition & 1 deletion src/SJP.Schematic.Tool/Commands/CompletionCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public sealed class Settings : CommandSettings
public ShellType Shell { get; init; }
}

protected override int Execute(CommandContext context, Settings settings, CancellationToken cancellationToken)
public override int Execute(CommandContext context, Settings settings, CancellationToken cancellationToken)
{
var script = GetCompletionScript(settings.Shell);

Expand Down
2 changes: 1 addition & 1 deletion src/SJP.Schematic.Tool/Commands/ExportCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public ExportCommand(
_fileSystem = fileSystem;
}

protected override async Task<int> ExecuteAsync(CommandContext context, Settings settings, CancellationToken cancellationToken)
public override async Task<int> ExecuteAsync(CommandContext context, Settings settings, CancellationToken cancellationToken)
{
var dependencyProvider = _dependencyProviderFactory.GetDbDependencies(settings);
var connection = dependencyProvider.GetSchematicConnection();
Expand Down
2 changes: 1 addition & 1 deletion src/SJP.Schematic.Tool/Commands/GenerateEfCoreCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public GenerateEfCoreCommand(
_dependencyProviderFactory = dependencyProviderFactory;
}

protected override async Task<int> ExecuteAsync(CommandContext context, Settings settings, CancellationToken cancellationToken)
public override async Task<int> ExecuteAsync(CommandContext context, Settings settings, CancellationToken cancellationToken)
{
var dependencyProvider = _dependencyProviderFactory.GetDbDependencies(settings);
var connection = dependencyProvider.GetSchematicConnection();
Expand Down
2 changes: 1 addition & 1 deletion src/SJP.Schematic.Tool/Commands/GenerateOrmLiteCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public GenerateOrmLiteCommand(
_dependencyProviderFactory = dependencyProviderFactory;
}

protected override async Task<int> ExecuteAsync(CommandContext context, Settings settings, CancellationToken cancellationToken)
public override async Task<int> ExecuteAsync(CommandContext context, Settings settings, CancellationToken cancellationToken)
{
var dependencyProvider = _dependencyProviderFactory.GetDbDependencies(settings);
var connection = dependencyProvider.GetSchematicConnection();
Expand Down
2 changes: 1 addition & 1 deletion src/SJP.Schematic.Tool/Commands/GeneratePocoCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public GeneratePocoCommand(
_dependencyProviderFactory = dependencyProviderFactory;
}

protected override async Task<int> ExecuteAsync(CommandContext context, Settings settings, CancellationToken cancellationToken)
public override async Task<int> ExecuteAsync(CommandContext context, Settings settings, CancellationToken cancellationToken)
{
var dependencyProvider = _dependencyProviderFactory.GetDbDependencies(settings);
var connection = dependencyProvider.GetSchematicConnection();
Expand Down
2 changes: 1 addition & 1 deletion src/SJP.Schematic.Tool/Commands/InitCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public InitCommand(IAnsiConsole console, IFileSystem fileSystem)
_fileSystem = fileSystem;
}

protected override async Task<int> ExecuteAsync(CommandContext context, Settings settings, CancellationToken cancellationToken)
public override async Task<int> ExecuteAsync(CommandContext context, Settings settings, CancellationToken cancellationToken)
{
if (_fileSystem.File.Exists(settings.OutputPath) && !settings.Force)
{
Expand Down
2 changes: 1 addition & 1 deletion src/SJP.Schematic.Tool/Commands/LintCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public LintCommand(
_dependencyProviderFactory = dependencyProviderFactory;
}

protected override async Task<int> ExecuteAsync(CommandContext context, Settings settings, CancellationToken cancellationToken)
public override async Task<int> ExecuteAsync(CommandContext context, Settings settings, CancellationToken cancellationToken)
{
var dependencyProvider = _dependencyProviderFactory.GetDbDependencies(settings);
var connection = dependencyProvider.GetSchematicConnection();
Expand Down
2 changes: 1 addition & 1 deletion src/SJP.Schematic.Tool/Commands/OrmCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class Settings : CommonSettings
public string? BaseNamespace { get; init; }
}

protected override int Execute(CommandContext context, Settings settings, CancellationToken cancellationToken)
public override int Execute(CommandContext context, Settings settings, CancellationToken cancellationToken)
{
return 0; // This command acts as a group for subcommands, so it doesn't have direct execution logic.
}
Expand Down
2 changes: 1 addition & 1 deletion src/SJP.Schematic.Tool/Commands/ReportCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public ReportCommand(
_fileLauncher = fileLauncher;
}

protected override async Task<int> ExecuteAsync(CommandContext context, Settings settings, CancellationToken cancellationToken)
public override async Task<int> ExecuteAsync(CommandContext context, Settings settings, CancellationToken cancellationToken)
{
var dependencyProvider = _dependencyProviderFactory.GetDbDependencies(settings);
var connection = dependencyProvider.GetSchematicConnection();
Expand Down
2 changes: 1 addition & 1 deletion src/SJP.Schematic.Tool/Commands/TestCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public TestCommand(
_dependencyProviderFactory = dependencyProviderFactory;
}

protected override async Task<int> ExecuteAsync(CommandContext context, Settings settings, CancellationToken cancellationToken)
public override async Task<int> ExecuteAsync(CommandContext context, Settings settings, CancellationToken cancellationToken)
{
var dependencyProvider = _dependencyProviderFactory.GetDbDependencies(settings);
var connectionFactory = dependencyProvider.GetConnectionFactory();
Expand Down
Loading