Skip to content

Commit 89359a7

Browse files
committed
Implemented more expressive test names
For consistency with e.g. `AttributeValueCollectionTest` and `ITopicRepositoryTest`, updated the test namesin `RelatedTopicCollectionTest` to be more expressive. Because of the nature of the current tests, the full format of `METHOD_CONDITION_RESULT` doesn't really make sense, as most of these tests don't vary by condition, and so I've shortened it to `METHOD_RESULT`. We may revisit this later if we expand the test coverage.
1 parent 894ac00 commit 89359a7

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

OnTopic.Tests/RelatedTopicCollectionTest.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ namespace OnTopic.Tests {
2020
public class RelatedTopicCollectionTest {
2121

2222
/*==========================================================================================================================
23-
| TEST: SET TOPIC
23+
| TEST: SET TOPIC: CREATES RELATIONSHIP
2424
\-------------------------------------------------------------------------------------------------------------------------*/
2525
/// <summary>
2626
/// Sets a relationship and confirms that it is accessible.
2727
/// </summary>
2828
[TestMethod]
29-
public void SetTopic() {
29+
public void SetTopic_CreatesRelationship() {
3030

3131
var parent = TopicFactory.Create("Parent", "Page");
3232
var related = TopicFactory.Create("Related", "Page");
@@ -38,13 +38,13 @@ public void SetTopic() {
3838
}
3939

4040
/*==========================================================================================================================
41-
| TEST: INCOMING RELATIONSHIP
41+
| TEST: SET TOPIC: CREATES INCOMING RELATIONSHIP
4242
\-------------------------------------------------------------------------------------------------------------------------*/
4343
/// <summary>
4444
/// Sets a relationship and confirms that it is accessible on incoming relationships property.
4545
/// </summary>
4646
[TestMethod]
47-
public void IncomingRelationship() {
47+
public void SetTopic_CreatesIncomingRelationship() {
4848

4949
var parent = TopicFactory.Create("Parent", "Page");
5050
var related = TopicFactory.Create("Related", "Page");
@@ -57,13 +57,13 @@ public void IncomingRelationship() {
5757
}
5858

5959
/*==========================================================================================================================
60-
| TEST: KEYS
60+
| TEST: SET TOPIC: UPDATES KEY COUNT
6161
\-------------------------------------------------------------------------------------------------------------------------*/
6262
/// <summary>
6363
/// Sets relationships in multiple namespaces, and the correct number of keys are returned.
6464
/// </summary>
6565
[TestMethod]
66-
public void Keys() {
66+
public void SetTopic_UpdatesKeyCount() {
6767

6868
var parent = TopicFactory.Create("Parent", "Page");
6969
var relationships = new RelatedTopicCollection(parent);
@@ -78,13 +78,13 @@ public void Keys() {
7878
}
7979

8080
/*==========================================================================================================================
81-
| TEST: GET ALL TOPICS
81+
| TEST: GET ALL TOPICS: RETURNS ALL TOPICS
8282
\-------------------------------------------------------------------------------------------------------------------------*/
8383
/// <summary>
8484
/// Sets relationships in multiple namespaces, and ensures they are all returned via GetAllTopics().
8585
/// </summary>
8686
[TestMethod]
87-
public void GetAllTopics() {
87+
public void GetAllTopics_ReturnsAllTopics() {
8888

8989
var parent = TopicFactory.Create("Parent", "Page");
9090
var relationships = new RelatedTopicCollection(parent);
@@ -100,14 +100,14 @@ public void GetAllTopics() {
100100
}
101101

102102
/*==========================================================================================================================
103-
| TEST: GET ALL CONTENT TYPES
103+
| TEST: GET ALL CONTENT TYPES: RETURNS ALL CONTENT TYPES
104104
\-------------------------------------------------------------------------------------------------------------------------*/
105105
/// <summary>
106106
/// Sets relationships in multiple namespaces, with different ContentTypes, then filters the results of
107107
/// <see cref="RelatedTopicCollection.GetAllTopics(String)"/> by content type.
108108
/// </summary>
109109
[TestMethod]
110-
public void GetAllContentTypes() {
110+
public void GetAllContentTypes_ReturnsAllContentTypes() {
111111

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

0 commit comments

Comments
 (0)