Skip to content

Commit 8cbf7da

Browse files
committed
Established stub data for evaluating response caching
Added a new `/Web/CachedPage` and a new `/Web/UncachedPage` to the `StubTopicRepository` in anticipation of introducing integration tests for the new `[TopicResponseCache]` attribute (9bc5797). The first topic is associated with a new `CacheProfile` topic.
1 parent 19b7c05 commit 8cbf7da

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

OnTopic.AspNetCore.Mvc.IntegrationTests.Host/Repositories/StubTopicRepository.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,18 @@ private static Topic CreateFakeData() {
170170
_ = new Topic("400", "Page", error, currentAttributeId++);
171171
_ = new Topic("Unauthorized", "Page", error, currentAttributeId++);
172172

173+
/*------------------------------------------------------------------------------------------------------------------------
174+
| Establish caching tests
175+
\-----------------------------------------------------------------------------------------------------------------------*/
176+
var cacheProfile = new Topic("CacheProfile", "CacheProfile", rootTopic, currentAttributeId++);
177+
var cachedPage = new Topic("CachedPage", "Page", web, currentAttributeId++);
178+
var uncachedPage = new Topic("UncachedPage", "Page", web, currentAttributeId++);
179+
180+
cacheProfile.Attributes.SetValue("Duration", "10");
181+
cacheProfile.Attributes.SetValue("Location", "Any");
182+
183+
cachedPage.References.SetValue("CacheProfile", cacheProfile);
184+
173185
/*------------------------------------------------------------------------------------------------------------------------
174186
| Set to cache
175187
\-----------------------------------------------------------------------------------------------------------------------*/

0 commit comments

Comments
 (0)