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
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
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())Body) content (dependent on PreloadTopicPayloadas part ofMapAsync()#133)