Repository navigation
Closed
Labels
Area: MappingRelates to one of the `ITopicMappingService` interfaces or implementations.Relates to one of the `ITopicMappingService` interfaces or implementations.Area: RepositoriesRelates to the `ITopicRepository` interface or one of its implementations.Relates to the `ITopicRepository` interface or one of its implementations.Priority: 1Severity 2: MajorStatus 2: ScheduledPlanned for an upcoming release.Planned for an upcoming release.Type: ImprovementImproves the functionality or interface of an existing feature.Improves the functionality or interface of an existing feature.
Milestone
Description
Unit tests already demonstrates that lazy loading works in isolation, but nothing yet demonstrates that it works a real web request: Routing, controller, view-model mapping, and response caching all working together. This adds a test that requests an actual page whose view renders lazily-loaded child pages, and confirms the child data shows up correctly in the response.
Tasks
- Create a small seed dataset representing a page with lazily-loaded children (
StubLazyLoadingTopicRepositoryBuilder) - Add a test view model with a
Childrencollection and a matching view- New
LazyContainerTopicViewModelin the Host'sModels/, - New
LazyContainer.cshtmlin the Host'sViews/LazyContainer/ - Deliberately don't use a
Bodyattribute for the proof; reading it doesn't reliably trigger the lazy fill, so a passing test could be a false negative
- New
- Add the integration test: Request the page, assert both children render, plus a "canary" assertion on the page's own title (new
LazyLoadingPipelineTest,OnTopic.AspNetCore.Mvc.IntegrationTests) - (Optional) Add a fetch-count spy to independently confirm the data loaded exactly once (
StubLazyLoadingTopicRepository.GetFetchCount()) - Add the equivalent test for extended attribute (e.g.,
Body) content (dependent on PreloadTopicPayloadas part ofMapAsync()#133) - Confirm the existing integration suite still passes unchanged
Metadata
Metadata
Assignees
Labels
Area: MappingRelates to one of the `ITopicMappingService` interfaces or implementations.Relates to one of the `ITopicMappingService` interfaces or implementations.Area: RepositoriesRelates to the `ITopicRepository` interface or one of its implementations.Relates to the `ITopicRepository` interface or one of its implementations.Priority: 1Severity 2: MajorStatus 2: ScheduledPlanned for an upcoming release.Planned for an upcoming release.Type: ImprovementImproves the functionality or interface of an existing feature.Improves the functionality or interface of an existing feature.
Activity
CachedTopicRepository#111JeremyCaney commentedon Aug 7, 2026
StubLazyLoadingTopicRepositoryBuilder)Childrencollection and a matching viewLazyContainerTopicViewModelin the Host'sModels/LazyContainer.cshtmlin the Host'sViews/LazyContainer/Bodyattribute for the proof; reading it doesn't reliably trigger the lazy fill, so a passing test could be a false negativeLazyLoadingPipelineTest,OnTopic.AspNetCore.Mvc.IntegrationTests)StubLazyLoadingTopicRepository.GetFetchCount())StubLazyLoadingTopicRepository(aa2c476)Body) content (dependent on PreloadTopicPayloadas part ofMapAsync()#133)EnsureLoaded_ExtendedAttributes_MaterializesRealValueand related cases (db8fbe8)TopicPayloadas part ofMapAsync()#133 by number