Skip to content

Commit f27a6ef

Browse files
committed
Added Error pages in preparation for unit testing ErrorController
These have no content, outside of their `Key`. The goal is to determine if the correct `Topic` is returned from the `ErrorController.HttpAsync()` method.
1 parent e30c998 commit f27a6ef

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

OnTopic.AspNetCore.Mvc.Tests/TestDoubles/TestTopicRepository.cs

+9
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@ private static Topic CreateFakeData() {
7272
var pageGroup = new Topic("PageGroup", "PageGroup", rootTopic);
7373
_ = new Topic("PageGroupChild", "Page", pageGroup);
7474

75+
/*------------------------------------------------------------------------------------------------------------------------
76+
| Establish error topics
77+
\-----------------------------------------------------------------------------------------------------------------------*/
78+
var error = new Topic("Error", "Page", rootTopic);
79+
80+
_ = new Topic("400", "Page", error);
81+
_ = new Topic("405", "Page", error);
82+
_ = new Topic("Unauthorized", "Page", error);
83+
7584
/*------------------------------------------------------------------------------------------------------------------------
7685
| Define attributes
7786
\-----------------------------------------------------------------------------------------------------------------------*/

0 commit comments

Comments
 (0)