diff --git a/.vscode/settings.json b/.vscode/settings.json index f81ecdf..b942a33 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,9 +1,9 @@ { "[csharp]": { "editor.codeActionsOnSave": { - "source.addMissingImports": true, - "source.fixAll": true, - "source.organizeImports": true + "source.addMissingImports": "explicit", + "source.fixAll": "explicit", + "source.organizeImports": "explicit" }, "editor.formatOnPaste": true, "editor.formatOnSave": true, @@ -137,12 +137,6 @@ "markdownlint.ignore": [ "**/LICENSE" ], - "omnisharp.enableEditorConfigSupport": true, - "omnisharp.enableMsBuildLoadProjectsOnDemand": false, - "omnisharp.enableRoslynAnalyzers": true, - "omnisharp.maxFindSymbolsItems": 3000, - "omnisharp.organizeImportsOnFormat": true, - "omnisharp.useModernNet": true, // Remove these if you're happy with your terminal profiles. "terminal.integrated.defaultProfile.windows": "Git Bash", "terminal.integrated.profiles.windows": { @@ -163,4 +157,4 @@ } }, "dotnet.completion.showCompletionItemsFromUnimportedNamespaces": true -} +} \ No newline at end of file diff --git a/Chickensoft.AutoInject.Tests/Chickensoft.AutoInject.Tests.csproj b/Chickensoft.AutoInject.Tests/Chickensoft.AutoInject.Tests.csproj index 26c37b5..582a596 100644 --- a/Chickensoft.AutoInject.Tests/Chickensoft.AutoInject.Tests.csproj +++ b/Chickensoft.AutoInject.Tests/Chickensoft.AutoInject.Tests.csproj @@ -1,6 +1,6 @@ - net6.0 + net7.0 true 10.0 enable @@ -14,9 +14,14 @@ full true + - - + + + + + + @@ -24,8 +29,8 @@ - - + + diff --git a/Chickensoft.AutoInject.Tests/badges/branch_coverage.svg b/Chickensoft.AutoInject.Tests/badges/branch_coverage.svg index f49b59a..21cd0e7 100644 --- a/Chickensoft.AutoInject.Tests/badges/branch_coverage.svg +++ b/Chickensoft.AutoInject.Tests/badges/branch_coverage.svg @@ -94,7 +94,7 @@ - Generated by: ReportGenerator 5.1.17.0 + Generated by: ReportGenerator 5.1.26.0 diff --git a/Chickensoft.AutoInject.Tests/badges/line_coverage.svg b/Chickensoft.AutoInject.Tests/badges/line_coverage.svg index fcdc4e5..e1f11a9 100644 --- a/Chickensoft.AutoInject.Tests/badges/line_coverage.svg +++ b/Chickensoft.AutoInject.Tests/badges/line_coverage.svg @@ -94,7 +94,7 @@ - Generated by: ReportGenerator 5.1.17.0 + Generated by: ReportGenerator 5.1.26.0 diff --git a/Chickensoft.AutoInject.Tests/src/Dependent.cs b/Chickensoft.AutoInject.Tests/src/Dependent.cs index 9382040..ade0fa9 100644 --- a/Chickensoft.AutoInject.Tests/src/Dependent.cs +++ b/Chickensoft.AutoInject.Tests/src/Dependent.cs @@ -411,7 +411,8 @@ ImmutableDictionary dependenciesToResolve var shouldResolve = true; var remainingDependencies = new HashSet(dependenciesToResolve.Values); - var node = (Node)dependent; + + var node = ((Node)dependent).GetParent(); var foundDependencies = new HashSet(); var providersInitializing = 0; diff --git a/Chickensoft.AutoInject.Tests/test/Tests.cs b/Chickensoft.AutoInject.Tests/test/Tests.cs index 104823a..1e1f0b3 100644 --- a/Chickensoft.AutoInject.Tests/test/Tests.cs +++ b/Chickensoft.AutoInject.Tests/test/Tests.cs @@ -1,10 +1,12 @@ namespace Chickensoft.AutoInject.Tests; using System.Reflection; +using Chickensoft.GoDotTest; using Godot; -using GoDotTest; public partial class Tests : Node2D { - public override void _Ready() - => _ = GoTest.RunTests(Assembly.GetExecutingAssembly(), this); + public override void _Ready() => CallDeferred(MethodName.RunTests); + + public void RunTests() => + GoTest.RunTests(Assembly.GetExecutingAssembly(), this); } diff --git a/Chickensoft.AutoInject.Tests/test/src/MiscTest.cs b/Chickensoft.AutoInject.Tests/test/src/MiscTest.cs index 6034ab4..7ca5889 100644 --- a/Chickensoft.AutoInject.Tests/test/src/MiscTest.cs +++ b/Chickensoft.AutoInject.Tests/test/src/MiscTest.cs @@ -42,7 +42,7 @@ public void DependentStubs() { public void DependencyPendingCancels() { var provider = new StringProvider(); var initialized = false; - var onInitialized = void (IProvider provider) => initialized = true; + void onInitialized(IProvider provider) => initialized = true; provider.ProviderState.OnInitialized += onInitialized; diff --git a/Chickensoft.AutoInject.Tests/test/src/MultiResolutionTest.cs b/Chickensoft.AutoInject.Tests/test/src/MultiResolutionTest.cs index 4ac9d97..c89101e 100644 --- a/Chickensoft.AutoInject.Tests/test/src/MultiResolutionTest.cs +++ b/Chickensoft.AutoInject.Tests/test/src/MultiResolutionTest.cs @@ -16,9 +16,9 @@ public class MultiResolutionTest : TestClass { public MultiResolutionTest(Node testScene) : base(testScene) { } [Setup] - public async Task Setup() { + public void Setup() { _fixture = new Fixture(TestScene.GetTree()); - _provider = await _fixture.LoadAndAddScene( + _provider = _fixture.LoadScene( "res://test/fixtures/MultiProvider.tscn" ); } @@ -28,8 +28,9 @@ public async Task Setup() { [Test] public async Task MultiDependentSubscribesToMultiProviderCorrectly() { + await _fixture.AddToRoot(_provider); + await _provider.WaitForEvents(); _provider.Child.ReadyCalled.ShouldBeTrue(); - await TestScene.ProcessFrame(2); _provider.Child.OnResolvedCalled.ShouldBeTrue(); } } diff --git a/global.json b/global.json index e9549b1..def7556 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "6.0.407", + "version": "8.0.100", "rollForward": "latestMinor" }, "msbuild-sdks": { - "Godot.NET.Sdk": "4.0.4" + "Godot.NET.Sdk": "4.2.2" } -} +} \ No newline at end of file