Skip to content

Commit 5f43dd6

Browse files
committed
Simplified test names
Removed the class name prefix (since it's listed in the class name, and tests can be grouped by class) and removed the "Test" suffix (since these are all test methods in test classes, this should be implicit). We may revisit these again in the future, but for now they're more succinct and easier to read in Visual Studio's Test Explorer.
1 parent 4dfa925 commit 5f43dd6

10 files changed

Lines changed: 86 additions & 86 deletions

Ignia.Topics.Tests/AttributeValueCollectionTest.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class AttributeValueCollectionTest {
2626
/// Creates a new topic and ensures that the key can be returned as an attribute.
2727
/// </summary>
2828
[TestMethod]
29-
public void AttributeValueCollection_GetValueTest() {
29+
public void GetValue() {
3030
var topic = TopicFactory.Create("Test", "Container");
3131
Assert.AreEqual<string>("Test", topic.Attributes.GetValue("Key"));
3232
}
@@ -38,7 +38,7 @@ public void AttributeValueCollection_GetValueTest() {
3838
/// Ensures that integer values can be set and retrieved as expected.
3939
/// </summary>
4040
[TestMethod]
41-
public void AttributeValueCollection_GetIntegerTest() {
41+
public void GetInteger() {
4242

4343
var topic = TopicFactory.Create("Test", "Container");
4444

@@ -60,7 +60,7 @@ public void AttributeValueCollection_GetIntegerTest() {
6060
/// Ensures that integer values can be set and retrieved as expected.
6161
/// </summary>
6262
[TestMethod]
63-
public void AttributeValueCollection_GetDateTimeTest() {
63+
public void GetDateTime() {
6464

6565
var topic = TopicFactory.Create("Test", "Container");
6666
var dateTime1 = new DateTime(1976, 10, 15);
@@ -84,7 +84,7 @@ public void AttributeValueCollection_GetDateTimeTest() {
8484
/// Ensures that boolean values can be set and retrieved as expected.
8585
/// </summary>
8686
[TestMethod]
87-
public void AttributeValueCollection_GetBooleanTest() {
87+
public void GetBoolean() {
8888

8989
var topic = TopicFactory.Create("Test", "Container");
9090

@@ -110,7 +110,7 @@ public void AttributeValueCollection_GetBooleanTest() {
110110
/// Creates a new topic and requests an invalid attribute; ensures falls back to the default.
111111
/// </summary>
112112
[TestMethod]
113-
public void AttributeValueCollection_DefaultValueTest() {
113+
public void DefaultValue() {
114114
var topic = TopicFactory.Create("Test", "Container");
115115
Assert.AreEqual<string>("Foo", topic.Attributes.GetValue("InvalidAttribute", "Foo"));
116116
}
@@ -122,7 +122,7 @@ public void AttributeValueCollection_DefaultValueTest() {
122122
/// Sets a custom attribute on a topic and ensures it can be retrieved.
123123
/// </summary>
124124
[TestMethod]
125-
public void AttributeValueCollection_SetValueTest() {
125+
public void SetValue() {
126126
var topic = TopicFactory.Create("Test", "Container");
127127
topic.Attributes.SetValue("Foo", "Bar");
128128
Assert.AreEqual<string>("Bar", topic.Attributes.GetValue("Foo"));
@@ -135,7 +135,7 @@ public void AttributeValueCollection_SetValueTest() {
135135
/// Modifies the value of a custom attribute on a topic and ensures it is marked as IsDirty.
136136
/// </summary>
137137
[TestMethod]
138-
public void AttributeValueCollection_SetValue_IsDirtyTest() {
138+
public void SetValue_IsDirtyTest() {
139139

140140
var topic = TopicFactory.Create("Test", "Container");
141141

@@ -159,7 +159,7 @@ public void AttributeValueCollection_SetValue_IsDirtyTest() {
159159
/// retrieved.
160160
/// </summary>
161161
[TestMethod]
162-
public void AttributeValueCollection_SetValue_BackdoorTest() {
162+
public void SetValue_BackdoorTest() {
163163

164164
var topic = TopicFactory.Create("Test", "Container");
165165

@@ -179,7 +179,7 @@ public void AttributeValueCollection_SetValue_BackdoorTest() {
179179
/// </summary>
180180
[TestMethod]
181181
[ExpectedException(typeof(TargetInvocationException), "The topic allowed a key to be set via a back door, without routing it through the Key property.")]
182-
public void AttributeValueCollection_EnforceBusinessLogicTest() {
182+
public void EnforceBusinessLogic() {
183183
var topic = TopicFactory.Create("Test", "Container");
184184
topic.Attributes.SetValue("Key", "# ?");
185185
}
@@ -192,7 +192,7 @@ public void AttributeValueCollection_EnforceBusinessLogicTest() {
192192
/// </summary>
193193
[TestMethod]
194194
[ExpectedException(typeof(TargetInvocationException), "The topic allowed a key to be set via a back door, without routing it through the Key property.")]
195-
public void AttributeValueCollection_EnforceBusinessLogic_BackdoorTest() {
195+
public void EnforceBusinessLogic_Backdoor() {
196196
var topic = TopicFactory.Create("Test", "Container");
197197
topic.Attributes.Remove("Key");
198198
topic.Attributes.Add(new AttributeValue("Key", "# ?"));
@@ -205,7 +205,7 @@ public void AttributeValueCollection_EnforceBusinessLogic_BackdoorTest() {
205205
/// Sets an attribute on the parent of a topic and ensures it can be retrieved using inheritance.
206206
/// </summary>
207207
[TestMethod]
208-
public void AttributeValueCollection_InheritFromParentTest() {
208+
public void InheritFromParent() {
209209

210210
var topics = new Topic[8];
211211

@@ -230,7 +230,7 @@ public void AttributeValueCollection_InheritFromParentTest() {
230230
/// Establishes a long tree of derives topics, and ensures that inheritance will pursue no more than five hops.
231231
/// </summary>
232232
[TestMethod]
233-
public void AttributeValueCollection_MaxHopsTest() {
233+
public void MaxHops() {
234234

235235
var topics = new Topic[8];
236236

Ignia.Topics.Tests/ITopicRepositoryTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public ITopicRepositoryTest() {
5454
/// Loads topics and ensures there are the expected number of children.
5555
/// </summary>
5656
[TestMethod]
57-
public void ITopicRepository_LoadTest() {
57+
public void Load() {
5858

5959
var rootTopic = _topicRepository.Load();
6060
var topic = _topicRepository.Load("Root:Configuration:ContentTypes:Page");
@@ -73,7 +73,7 @@ public void ITopicRepository_LoadTest() {
7373
/// Loads topic by ID and ensures it is found.
7474
/// </summary>
7575
[TestMethod]
76-
public void ITopicRepository_LoadByIdTest() {
76+
public void LoadById() {
7777

7878
var topic = _topicRepository.Load(11111);
7979

@@ -89,7 +89,7 @@ public void ITopicRepository_LoadByIdTest() {
8989
/// Saves topics and ensures their identifiers are properly set.
9090
/// </summary>
9191
[TestMethod]
92-
public void ITopicRepository_SaveTest() {
92+
public void Save() {
9393

9494
var rootTopic = _topicRepository.Load();
9595
var web = _topicRepository.Load("Root:Web");
@@ -116,7 +116,7 @@ public void ITopicRepository_SaveTest() {
116116
/// Moves topics and ensures their parents are correctly set.
117117
/// </summary>
118118
[TestMethod]
119-
public void ITopicRepository_MoveTest() {
119+
public void Move() {
120120

121121
var rootTopic = _topicRepository.Load();
122122
var source = _topicRepository.Load("Root:Web:Web_0");
@@ -142,7 +142,7 @@ public void ITopicRepository_MoveTest() {
142142
/// Moves topic next to a different sibling and ensures it ends up in the correct location.
143143
/// </summary>
144144
[TestMethod]
145-
public void ITopicRepository_MoveToSiblingTest() {
145+
public void MoveToSibling() {
146146

147147
var rootTopic = _topicRepository.Load();
148148
var parent = _topicRepository.Load("Root:Web:Web_0");
@@ -169,7 +169,7 @@ public void ITopicRepository_MoveToSiblingTest() {
169169
/// Deletes a topic to ensure it is properly removed.
170170
/// </summary>
171171
[TestMethod]
172-
public void ITopicRepository_DeleteTest() {
172+
public void Delete() {
173173

174174
var parent = _topicRepository.Load("Root:Web:Web_1");
175175
var topic = _topicRepository.Load("Root:Web:Web_1:Web_1_1");

Ignia.Topics.Tests/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
[assembly: AssemblyTrademark("")]
2222
[assembly: AssemblyCulture("")]
2323
[assembly: ComVisible(false)]
24-
[assembly: AssemblyVersion("3.5.1762.0")]
25-
[assembly: AssemblyFileVersion("3.5.1810.0")]
24+
[assembly: AssemblyVersion("3.5.1763.0")]
25+
[assembly: AssemblyFileVersion("3.5.1811.0")]
2626
[assembly: CLSCompliant(true)]
2727
[assembly: Guid("27632801-bfe3-41d9-8678-3c4bbe45e6c9")]

Ignia.Topics.Tests/RelatedTopicCollectionTest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class RelatedTopicCollectionTest {
2626
/// Sets a relationship and confirms that it is accessible.
2727
/// </summary>
2828
[TestMethod]
29-
public void RelatedTopicCollection_SetTopic() {
29+
public void SetTopic() {
3030

3131
var parent = TopicFactory.Create("Parent", "Page");
3232
var related = TopicFactory.Create("Related", "Page");
@@ -44,7 +44,7 @@ public void RelatedTopicCollection_SetTopic() {
4444
/// Sets a relationship and confirms that it is accessible on incoming relationships property.
4545
/// </summary>
4646
[TestMethod]
47-
public void RelatedTopicCollection_IncomingRelationshipTest() {
47+
public void IncomingRelationship() {
4848

4949
var parent = TopicFactory.Create("Parent", "Page");
5050
var related = TopicFactory.Create("Related", "Page");
@@ -63,7 +63,7 @@ public void RelatedTopicCollection_IncomingRelationshipTest() {
6363
/// Sets relationships in multiple namespaces, and the correct number of keys are returned.
6464
/// </summary>
6565
[TestMethod]
66-
public void RelatedTopicCollection_KeysTest() {
66+
public void Keys() {
6767

6868
var parent = TopicFactory.Create("Parent", "Page");
6969
var relationships = new RelatedTopicCollection(parent);
@@ -84,7 +84,7 @@ public void RelatedTopicCollection_KeysTest() {
8484
/// Sets relationships in multiple namespaces, and ensures they are all returned via GetAllTopics().
8585
/// </summary>
8686
[TestMethod]
87-
public void RelatedTopicCollection_GetAllTopicsTest() {
87+
public void GetAllTopics() {
8888

8989
var parent = TopicFactory.Create("Parent", "Page");
9090
var relationships = new RelatedTopicCollection(parent);
@@ -107,7 +107,7 @@ public void RelatedTopicCollection_GetAllTopicsTest() {
107107
/// <see cref="RelatedTopicCollection.GetAllTopics(String)"/> by content type.
108108
/// </summary>
109109
[TestMethod]
110-
public void RelatedTopicCollection_GetAllContentTypesTest() {
110+
public void GetAllContentTypes() {
111111

112112
var parent = TopicFactory.Create("Parent", "Page");
113113
var relationships = new RelatedTopicCollection(parent);

Ignia.Topics.Tests/TopicCollectionTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class TopicCollectionTest {
2626
/// Establishes a number of topics, then accesses them by key.
2727
/// </summary>
2828
[TestMethod]
29-
public void TopicCollection_SetTopicTest() {
29+
public void SetTopic() {
3030

3131
var topics = new TopicCollection();
3232

@@ -45,7 +45,7 @@ public void TopicCollection_SetTopicTest() {
4545
/// Establishes a number of topics, then seeds a new <see cref="TopicCollection{T}"/> with them.
4646
/// </summary>
4747
[TestMethod]
48-
public void TopicCollection_PrepopulateTest() {
48+
public void Prepopulate() {
4949

5050
var topics = new List<Topic>();
5151

@@ -66,7 +66,7 @@ public void TopicCollection_PrepopulateTest() {
6666
/// Establishes a number of topics, converts the collection to read only, and ensures they are still present.
6767
/// </summary>
6868
[TestMethod]
69-
public void TopicCollection_AsReadOnlyTest() {
69+
public void AsReadOnly() {
7070

7171
var topics = new TopicCollection();
7272

Ignia.Topics.Tests/TopicControllerTest.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ public TopicControllerTest() {
6060
| TEST: TOPIC
6161
\-------------------------------------------------------------------------------------------------------------------------*/
6262
/// <summary>
63-
/// Triggers the <see cref="TopicController.IndexAsync(string)" /> action.
63+
/// Triggers the <see cref="TopicController.IndexAsync(String)" /> action.
6464
/// </summary>
6565
[TestMethod]
66-
public async Task TopicController_IndexTestAsync() {
66+
public async Task TopicController_IndexAsync() {
6767

6868
var topicRoutingService = new MvcTopicRoutingService(_topicRepository, _uri, _routeData);
6969
var mappingService = new TopicMappingService(_topicRepository, new FakeViewModelLookupService());
@@ -81,10 +81,10 @@ public async Task TopicController_IndexTestAsync() {
8181
| TEST: ERROR
8282
\-------------------------------------------------------------------------------------------------------------------------*/
8383
/// <summary>
84-
/// Triggers the <see cref="ErrorControllerBase{T}.Error(string)" /> action.
84+
/// Triggers the <see cref="ErrorControllerBase{T}.Error(String)" /> action.
8585
/// </summary>
8686
[TestMethod]
87-
public void ErrorController_ErrorTest() {
87+
public void ErrorController_Error() {
8888

8989
var controller = new ErrorController();
9090
var result = controller.Error("ErrorPage") as ViewResult;
@@ -99,10 +99,10 @@ public void ErrorController_ErrorTest() {
9999
| TEST: NOT FOUND ERROR
100100
\-------------------------------------------------------------------------------------------------------------------------*/
101101
/// <summary>
102-
/// Triggers the <see cref="ErrorControllerBase{T}.NotFound(string)" /> action.
102+
/// Triggers the <see cref="ErrorControllerBase{T}.NotFound(String)" /> action.
103103
/// </summary>
104104
[TestMethod]
105-
public void ErrorController_NotFoundTest() {
105+
public void ErrorController_NotFound() {
106106

107107
var controller = new ErrorController();
108108
var result = controller.Error("NotFoundPage") as ViewResult;
@@ -117,10 +117,10 @@ public void ErrorController_NotFoundTest() {
117117
| TEST: INTERNAL SERVER ERROR
118118
\-------------------------------------------------------------------------------------------------------------------------*/
119119
/// <summary>
120-
/// Triggers the <see cref="ErrorControllerBase{T}.InternalServer(string)" /> action.
120+
/// Triggers the <see cref="ErrorControllerBase{T}.InternalServer(String)" /> action.
121121
/// </summary>
122122
[TestMethod]
123-
public void ErrorController_InternalServerTest() {
123+
public void ErrorController_InternalServer() {
124124

125125
var controller = new ErrorController();
126126
var result = controller.Error("InternalServer") as ViewResult;
@@ -138,7 +138,7 @@ public void ErrorController_InternalServerTest() {
138138
/// Triggers the <see cref="FallbackController.Index()" /> action.
139139
/// </summary>
140140
[TestMethod]
141-
public void FallbackController_IndexTest() {
141+
public void FallbackController_Index() {
142142

143143
var controller = new FallbackController();
144144
var result = controller.Index() as HttpNotFoundResult;
@@ -156,7 +156,7 @@ public void FallbackController_IndexTest() {
156156
/// Triggers the <see cref="FallbackController.Index()" /> action.
157157
/// </summary>
158158
[TestMethod]
159-
public void RedirectController_TopicRedirectTest() {
159+
public void RedirectController_TopicRedirect() {
160160

161161
var controller = new RedirectController(_topicRepository);
162162
var result = controller.Redirect(11110) as RedirectResult;
@@ -180,7 +180,7 @@ public void RedirectController_TopicRedirectTest() {
180180
/// </remarks>
181181
[TestMethod]
182182
[ExpectedException(typeof(NullReferenceException), AllowDerivedTypes=false)]
183-
public void SitemapController_IndexTest() {
183+
public void SitemapController_Index() {
184184

185185
var controller = new SitemapController(_topicRepository);
186186
var result = controller.Index() as ViewResult;
@@ -200,7 +200,7 @@ public void SitemapController_IndexTest() {
200200
/// Triggers the <see cref="FallbackController.Index()" /> action.
201201
/// </summary>
202202
[TestMethod]
203-
public async Task LayoutController_MenuTest() {
203+
public async Task Menu() {
204204

205205
var topicRoutingService = new MvcTopicRoutingService(_topicRepository, _uri, _routeData);
206206
var mappingService = new TopicMappingService(_topicRepository, new FakeViewModelLookupService());

0 commit comments

Comments
 (0)