Add test coverage for prerendering closed generic components#5
Conversation
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a8d897e322
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Assert.NotNull(preambleMarker.PrerenderId); | ||
| Assert.Equal("webassembly", preambleMarker.Type); | ||
| Assert.Equal(typeof(GenericComponent<string>).Assembly.GetName().Name, preambleMarker.Assembly); | ||
| Assert.Equal(typeof(GenericComponent<string>).FullName, preambleMarker.TypeName); |
There was a problem hiding this comment.
Assert WebAssembly marker against the rendered generic type
In CanPrerender_ClosedGenericComponent_ClientMode the component is rendered with typeof(GenericComponent<int>), but the assertions compare the marker’s assembly/type name against GenericComponent<string>. When the renderer emits the actual closed generic type (the common case), this will fail and make the test a false negative. The expectations should be updated to GenericComponent<int> to match the rendered component.
Useful? React with 👍 / 👎.
| namespace Microsoft.AspNetCore.Components.Server.Circuits | ||
| { | ||
| public class ServerComponentDeserializerTest |
There was a problem hiding this comment.
Keep file-scoped namespace per repo guidelines
The repository compliance rules in /workspace/aspnetcore-combined-codex/AGENTS.md require file-scoped namespaces for all C# files. This change converts the namespace to block-scoped, which violates that rule and will likely fail style enforcement/consistency checks. Please revert to a file-scoped namespace declaration.
Useful? React with 👍 / 👎.
Benchmark PR from agentic-review-benchmarks#5