Skip to content

Commit c802c44

Browse files
committed
Merge branch 'release-4.0.1'
2 parents 11415eb + a717517 commit c802c44

File tree

64 files changed

+1754
-758
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1754
-758
lines changed

OnTopic.AspNetCore.Mvc.Tests/OnTopic.AspNetCore.Mvc.Tests.csproj

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp3.0</TargetFramework>
@@ -9,7 +9,6 @@
99
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
1010
<PackageReference Include="MSTest.TestAdapter" Version="2.0.0" />
1111
<PackageReference Include="MSTest.TestFramework" Version="2.0.0" />
12-
<PackageReference Include="coverlet.collector" Version="1.0.1" />
1312
</ItemGroup>
1413

1514
<ItemGroup>

OnTopic.AspNetCore.Mvc.Tests/TopicControllerTest.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ public TopicControllerTest() {
7878
}
7979

8080
/*==========================================================================================================================
81-
| TEST: TOPIC
81+
| TEST: TOPIC CONTROLLER: INDEX ASYNC: RETURNS TOPIC VIEW RESULT
8282
\-------------------------------------------------------------------------------------------------------------------------*/
8383
/// <summary>
8484
/// Triggers the <see cref="TopicController.IndexAsync(String)" /> action.
8585
/// </summary>
8686
[TestMethod]
87-
public async Task TopicController_IndexAsync() {
87+
public async Task TopicController_IndexAsync_ReturnsTopicViewResult() {
8888

8989
var controller = new TopicController(_topicRepository, _topicMappingService) {
9090
ControllerContext = _context
@@ -101,13 +101,13 @@ public async Task TopicController_IndexAsync() {
101101
}
102102

103103
/*==========================================================================================================================
104-
| TEST: REDIRECT
104+
| TEST: REDIRECT CONTROLLER: REDIRECT: RETURNS REDIRECT RESULT
105105
\-------------------------------------------------------------------------------------------------------------------------*/
106106
/// <summary>
107107
/// Triggers the <see cref="FallbackController.Index()" /> action.
108108
/// </summary>
109109
[TestMethod]
110-
public void RedirectController_TopicRedirect() {
110+
public void RedirectController_TopicRedirect_ReturnsRedirectResult() {
111111

112112
var controller = new RedirectController(_topicRepository);
113113
var result = controller.Redirect(11110) as RedirectResult;
@@ -121,7 +121,7 @@ public void RedirectController_TopicRedirect() {
121121
}
122122

123123
/*==========================================================================================================================
124-
| TEST: SITEMAP
124+
| TEST: SITEMAP CONTROLLER: INDEX: RETURNS SITEMAP XML
125125
\-------------------------------------------------------------------------------------------------------------------------*/
126126
/// <summary>
127127
/// Triggers the index action of the <see cref="SitemapController.Index()" /> action.
@@ -133,7 +133,7 @@ public void RedirectController_TopicRedirect() {
133133
/// </remarks>
134134
[TestMethod]
135135
[ExpectedException(typeof(NullReferenceException), AllowDerivedTypes=false)]
136-
public void SitemapController_Index() {
136+
public void SitemapController_Index_ReturnsSitemapXml() {
137137

138138
var controller = new SitemapController(_topicRepository);
139139
var result = controller.Index() as ViewResult;

OnTopic.AspNetCore.Mvc.Tests/TopicRepositoryExtensionsTest.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ public TopicRepositoryExtensionsTest() {
4343
}
4444

4545
/*==========================================================================================================================
46-
| TEST: LOAD (ROUTE)
46+
| TEST: LOAD: BY ROUTE: RETURNS TOPIC
4747
\-------------------------------------------------------------------------------------------------------------------------*/
4848
/// <summary>
4949
/// Establishes route data and ensures that a topic is correctly identified based on that route.
5050
/// </summary>
5151
[TestMethod]
52-
public void LoadRoute() {
52+
public void Load_ByRoute_ReturnsTopic() {
5353

5454
var routes = new RouteData();
5555
var topic = _topicRepository.Load("Root:Web:Web_0:Web_0_1:Web_0_1_1");

OnTopic.AspNetCore.Mvc.Tests/TopicViewComponentTest.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ public TopicViewComponentTest() {
9797
}
9898

9999
/*==========================================================================================================================
100-
| TEST: MENU
100+
| TEST: MENU: INVOKE: RETURNS NAVIGATION VIEW MODEL
101101
\-------------------------------------------------------------------------------------------------------------------------*/
102102
/// <summary>
103103
/// Loads a new <see cref="MenuViewComponent"/> and confirms the resulting values.
104104
/// </summary>
105105
[TestMethod]
106-
public async Task Menu() {
106+
public async Task Menu_Invoke_ReturnsNavigationViewModel() {
107107

108108
var viewComponent = new MenuViewComponent(_topicRepository, _hierarchicalMappingService) {
109109
ViewComponentContext = _context
@@ -122,13 +122,13 @@ public async Task Menu() {
122122
}
123123

124124
/*==========================================================================================================================
125-
| TEST: PAGE-LEVEL NAVIGATION
125+
| TEST: PAGE-LEVEL NAVIGATION: INVOKE: RETURNS NAVIGATION VIEW MODEL
126126
\-------------------------------------------------------------------------------------------------------------------------*/
127127
/// <summary>
128128
/// Loads a new <see cref="PageLevelNavigationViewComponent"/> and confirms the resulting values.
129129
/// </summary>
130130
[TestMethod]
131-
public async Task PageLevelNavigation() {
131+
public async Task PageLevelNavigation_Invoke_ReturnsNavigationViewModel() {
132132

133133
var viewComponent = new PageLevelNavigationViewComponent(_topicRepository, _hierarchicalMappingService) {
134134
ViewComponentContext = _context

OnTopic.AspNetCore.Mvc.Tests/ValidateTopicAttributeTest.cs

+12-12
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ public static TopicController GetTopicController(Topic topic) =>
8787
};
8888

8989
/*==========================================================================================================================
90-
| TEST: INVALID CONTROLLER THROWS EXCEPTION
90+
| TEST: INVALID CONTROLLER TYPE THROWS EXCEPTION
9191
\-------------------------------------------------------------------------------------------------------------------------*/
9292
/// <summary>
9393
/// Ensures that a controller that doesn't derive from <see cref="TopicController"/> throws a <see
9494
/// cref="InvalidOperationException"/>.
9595
/// </summary>
9696
[TestMethod]
9797
[ExpectedException(typeof(InvalidOperationException))]
98-
public void InvalidController_Throws_Exception() {
98+
public void InvalidControllerType_ThrowsException() {
9999

100100
var validateFilter = new ValidateTopicAttribute();
101101
var controller = new DummyController() {
@@ -112,13 +112,13 @@ public void InvalidController_Throws_Exception() {
112112

113113
}
114114
/*==========================================================================================================================
115-
| TEST: NULL TOPIC RETURNS NOT FOUND
115+
| TEST: NULL TOPIC: RETURNS NOT FOUND
116116
\-------------------------------------------------------------------------------------------------------------------------*/
117117
/// <summary>
118118
/// Ensures that a <see cref="NotFoundObjectResult"/> is thrown if the <see cref="TopicController.CurrentTopic"/> is null.
119119
/// </summary>
120120
[TestMethod]
121-
public void NullTopic_Returns_NotFound() {
121+
public void NullTopic_ReturnsNotFound() {
122122

123123
var validateFilter = new ValidateTopicAttribute();
124124
var controller = GetTopicController(null);
@@ -133,13 +133,13 @@ public void NullTopic_Returns_NotFound() {
133133
}
134134

135135
/*==========================================================================================================================
136-
| TEST: DISABLED TOPIC RETURNS NOT AUTHORIZED
136+
| TEST: DISABLED TOPIC: RETURNS NOT AUTHORIZED
137137
\-------------------------------------------------------------------------------------------------------------------------*/
138138
/// <summary>
139139
/// Ensures that a <see cref="NotFoundObjectResult"/> is thrown if the <see cref="TopicController.CurrentTopic"/> is null.
140140
/// </summary>
141141
[TestMethod]
142-
public void DisabledTopic_Returns_NotFound() {
142+
public void DisabledTopic_ReturnsNotFound() {
143143

144144
var validateFilter = new ValidateTopicAttribute();
145145
var topic = TopicFactory.Create("Key", "Page");
@@ -157,14 +157,14 @@ public void DisabledTopic_Returns_NotFound() {
157157
}
158158

159159
/*==========================================================================================================================
160-
| TEST: TOPIC WITH URL RETURNS REDIRECT
160+
| TEST: TOPIC WITH URL: RETURNS REDIRECT
161161
\-------------------------------------------------------------------------------------------------------------------------*/
162162
/// <summary>
163163
/// Ensures that a <see cref="RedirectResult"/> is thrown if the <see cref="TopicController.CurrentTopic"/> contains
164164
/// a <c>Url</c> attribute.
165165
/// </summary>
166166
[TestMethod]
167-
public void TopicWithUrl_Returns_Redirect() {
167+
public void TopicWithUrl_ReturnsRedirect() {
168168

169169
var validateFilter = new ValidateTopicAttribute();
170170
var topic = TopicFactory.Create("Key", "Page");
@@ -182,14 +182,14 @@ public void TopicWithUrl_Returns_Redirect() {
182182
}
183183

184184
/*==========================================================================================================================
185-
| TEST: NESTED TOPIC RETURNS 403
185+
| TEST: NESTED TOPIC: RETURNS 403
186186
\-------------------------------------------------------------------------------------------------------------------------*/
187187
/// <summary>
188188
/// Ensures that a <see cref="StatusCodeResult"/> is thrown if the <see cref="TopicController.CurrentTopic"/> has a
189189
/// <see cref="ContentTypeDescriptor"/> of <c>List</c>.
190190
/// </summary>
191191
[TestMethod]
192-
public void NestedTopic_Returns_403() {
192+
public void NestedTopic_Returns403() {
193193

194194
var validateFilter = new ValidateTopicAttribute();
195195
var topic = TopicFactory.Create("Key", "List");
@@ -208,14 +208,14 @@ public void NestedTopic_Returns_403() {
208208
}
209209

210210
/*==========================================================================================================================
211-
| TEST: PAGE GROUP TOPIC RETURNS REDIRECT
211+
| TEST: PAGE GROUP TOPIC: RETURNS REDIRECT
212212
\-------------------------------------------------------------------------------------------------------------------------*/
213213
/// <summary>
214214
/// Ensures that a <see cref="RedirectResult"/> is thrown if the <see cref="TopicController.CurrentTopic"/> has a
215215
/// <see cref="ContentTypeDescriptor"/> of <c>PageGroup</c>.
216216
/// </summary>
217217
[TestMethod]
218-
public void PageGroupTopic_Returns_Redirect() {
218+
public void PageGroupTopic_ReturnsRedirect() {
219219

220220
var validateFilter = new ValidateTopicAttribute();
221221
var topic = TopicFactory.Create("Key", "PageGroup");
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2+
23
<PropertyGroup>
34
<ProjectGuid>{B7F136A1-C86D-4A74-AC4F-3693CD1358A4}</ProjectGuid>
5+
<RootNamespace>OnTopic.AspNetCore.Mvc</RootNamespace>
46
<TargetFramework>netcoreapp3.0</TargetFramework>
57
<ShouldCreateLogs>True</ShouldCreateLogs>
68
<AdvancedSettingsExpanded>False</AdvancedSettingsExpanded>
79
<LangVersion>8.0</LangVersion>
810
<Nullable>enable</Nullable>
911
</PropertyGroup>
12+
1013
<PropertyGroup>
11-
<AssemblyTitle>Ignia OnTopic ASP.NET Core Library</AssemblyTitle>
14+
<AssemblyTitle>OnTopic ASP.NET Core Library</AssemblyTitle>
1215
<Company>Ignia</Company>
13-
<Product>Ignia OnTopic Library</Product>
16+
<Product>OnTopic</Product>
1417
<Description>Provides presentation-layer support for the ASP.NET Core Framework.</Description>
1518
<Copyright>©2020 Ignia, LLC</Copyright>
1619
<OutputPath>bin\$(Configuration)\</OutputPath>
1720
<Authors>Ignia</Authors>
1821
</PropertyGroup>
22+
1923
<PropertyGroup>
2024
<PackageProjectUrl>https://github.com/Ignia/Topics-Library</PackageProjectUrl>
2125
<PackageTags>C# .NET CMS Presentation Web MVC ASP.NET Core Controller</PackageTags>
2226
<UseFullSemVerForNuGet>true</UseFullSemVerForNuGet>
2327
</PropertyGroup>
28+
2429
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2530
<DebugType>full</DebugType>
2631
<RunCodeAnalysis>false</RunCodeAnalysis>
@@ -31,11 +36,7 @@
3136
<DebugType>pdbonly</DebugType>
3237
<NoWarn>1701;1702;CA1303</NoWarn>
3338
</PropertyGroup>
34-
<ItemGroup>
35-
<Compile Remove="Backup\**" />
36-
<EmbeddedResource Remove="Backup\**" />
37-
<None Remove="Backup\**" />
38-
</ItemGroup>
39+
3940
<ItemGroup>
4041
<FrameworkReference Include="Microsoft.AspNetCore.App" />
4142
<PackageReference Include="GitVersionTask" Version="5.0.1">
@@ -45,16 +46,14 @@
4546
<PrivateAssets>all</PrivateAssets>
4647
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
4748
</PackageReference>
48-
<PackageReference Include="UtilPack.NuGet.MSBuild" Version="2.9.1">
49-
<PrivateAssets>all</PrivateAssets>
50-
</PackageReference>
51-
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
52-
<PackageReference Include="System.Net.Http" Version="4.3.4" />
5349
</ItemGroup>
50+
5451
<ItemGroup>
5552
<ProjectReference Include="..\OnTopic\OnTopic.csproj" />
5653
</ItemGroup>
54+
5755
<ItemGroup>
5856
<None Include="README.md" />
5957
</ItemGroup>
58+
6059
</Project>

0 commit comments

Comments
 (0)