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
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<PackageVersion Include="ModelContextProtocol" Version="1.4.1"/>
<PackageVersion Include="Roslynator.Analyzers" Version="4.15.0"/>
<PackageVersion Include="Roslynator.Formatting.Analyzers" Version="4.15.0"/>
<PackageVersion Include="SonarAnalyzer.CSharp" Version="10.29.0.143774"/>
<PackageVersion Include="SonarAnalyzer.CSharp" Version="10.30.0.144632"/>
<PackageVersion Include="Spectre.Console" Version="0.57.2"/>
<PackageVersion Include="Spectre.Console.Cli" Version="0.55.0"/>
<PackageVersion Include="Spectre.Console.Testing" Version="0.57.2"/>
Expand Down
2 changes: 1 addition & 1 deletion tests/ProjGraph.Tests.Integration.Mcp/McpTransportTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private static string LocateServerExecutable()
.FirstOrDefault();

serverExe.Should().NotBeNull($"the MCP server apphost must be present under {binRoot}");
return serverExe!.FullName;
return serverExe.FullName;
}

private static string JoinText(CallToolResult result)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public class Widget { }
await _sut.ExecuteAsync(filePath);

captured.Should().NotBeNull();
captured!.StartDirectory.Should().Be("/work/dir");
captured.StartDirectory.Should().Be("/work/dir");
}

private void SetupFileSystem(string filePath, string code)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public async Task ResolveRelatedSymbol_DiscoveredFileAlreadyInCompilation_Should
await _fileSystem.DidNotReceive().ReadAllTextAsync(Arg.Any<string>(), Arg.Any<CancellationToken>());
// The reused tree does not actually declare Ghost, so the original symbol is handed back.
resolved.Should().NotBeNull();
resolved!.Name.Should().Be("Ghost");
resolved.Name.Should().Be("Ghost");
}

[Fact]
Expand All @@ -130,7 +130,7 @@ public async Task ResolveRelatedSymbol_DiscoveredFileWithoutMatchingDeclaration_
var resolved = await sut.ResolveRelatedSymbolAsync(ghost, context);

resolved.Should().NotBeNull();
resolved!.Name.Should().Be("Ghost");
resolved.Name.Should().Be("Ghost");
}

[Fact]
Expand All @@ -149,7 +149,7 @@ public async Task ResolveRelatedSymbol_DiscoveredFileDeclaringTheType_ShouldReso
var resolved = await sut.ResolveRelatedSymbolAsync(ghost, context);

resolved.Should().NotBeNull();
resolved!.Name.Should().Be("Ghost");
resolved.Name.Should().Be("Ghost");
resolved.TypeKind.Should().Be(Microsoft.CodeAnalysis.TypeKind.Class);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public async Task ResolveRelatedSymbolAsync_SymbolDeclaredInCompilation_ShouldNo
var resolved = await sut.ResolveRelatedSymbolAsync(baseSymbol, context);

resolved.Should().NotBeNull();
resolved!.Name.Should().Be("Base");
resolved.Name.Should().Be("Base");
await _discovery.DidNotReceive().FindTypeDefinitionFileAsync(Arg.Any<string>(), Arg.Any<string>());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ public class Address

var owned = model.Entities.SingleOrDefault(e => e.Key == "Customer.Addresses");
owned.Should().NotBeNull("OwnsMany over an array navigation must still capture the owned type");
owned!.IsCollection.Should().BeTrue();
owned.IsCollection.Should().BeTrue();
owned.Properties.Select(p => p.Name).Should().Contain("Street").And.Contain("City");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public record Money(decimal Amount, string Currency = "USD");
var owned = model.Entities.SingleOrDefault(e => e.Key == "Product.Price");
owned.Should().NotBeNull(
"OwnsOne(p => p.Price) must capture the owned entity even though Money.cs is a separate file");
owned!.Properties.Select(p => p.Name).Should().BeEquivalentTo(["Amount", "Currency"],
owned.Properties.Select(p => p.Name).Should().BeEquivalentTo(["Amount", "Currency"],
"Money's columns can only come from CLR seeding — there is no Property() call for either — " +
"so this fails unless Money.cs was pulled into the compilation and resolved");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public class Money
owned.Should().NotBeNull(
"OwnsOne(p => p.Price) must capture the owned entity even though Product is record-declared " +
"and Money.cs is a separate file");
owned!.Properties.Select(p => p.Name).Should().BeEquivalentTo(["Amount", "Currency"],
owned.Properties.Select(p => p.Name).Should().BeEquivalentTo(["Amount", "Currency"],
"the pre-pass must find Price on the record-declared Product to discover Money.cs and pull it " +
"into the compilation; without that, Money resolves to an error type and the entity is captured " +
"with zero properties");
Expand Down Expand Up @@ -140,7 +140,7 @@ public record Money(decimal Amount, string Currency);
owned.Should().NotBeNull(
"OwnsOne(p => p.Price) must capture the owned entity even though Price is declared as a " +
"primary-constructor parameter rather than a property member");
owned!.Properties.Select(p => p.Name).Should().BeEquivalentTo(["Amount", "Currency"],
owned.Properties.Select(p => p.Name).Should().BeEquivalentTo(["Amount", "Currency"],
"the pre-pass must find the Price parameter on the positional record to discover Money.cs; " +
"without that, Money resolves to an error type and the owned entity renders as an empty box");

Expand Down
Loading