Skip to content

Commit 6c081d8

Browse files
committed
Updated unit test to pass root content type descriptor
Previously, the `GetContentTypeDescriptors_WithTopicGraph_ReturnsMergedContentTypes()` unit test validted its functionality by passing in a specific content type. This worked, but only because the initial functionality failed to validate that the `ContentTypeDescriptor` being sent was, in fact, the expected root `ContentTypeDescriptor`. This issue will ultimately be fixed by using the new `ContentTypeDescriptorCollection.Refresh()` method (3e3930f)'s validation (b206f3e). In anticipation of migrating to that, the unit test is being updated to be more specific.
1 parent b206f3e commit 6c081d8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

OnTopic.Tests/TopicRepositoryBaseTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ public void GetContentTypeDescriptors_WithTopicGraph_ReturnsMergedContentTypes()
321321
var newContentType = TopicFactory.Create("NewContentType", "ContentTypeDescriptor", rootContentType);
322322
var contentTypeCount = contentTypes.Count;
323323

324-
_topicRepository.GetContentTypeDescriptorsProxy((ContentTypeDescriptor)newContentType);
324+
_topicRepository.GetContentTypeDescriptorsProxy(rootContentType);
325325

326326
Assert.AreNotEqual<int>(contentTypeCount, contentTypes.Count);
327327
Assert.IsNotNull(contentTypes.Contains(newContentType));

0 commit comments

Comments
 (0)