Beispiel #1
0
        public void Can_Verify_Content_Type_Has_Content_Nodes()
        {
            // Arrange
            IScopeProvider provider = ScopeProvider;

            using (IScope scope = provider.CreateScope())
            {
                ContentTypeRepository repository = ContentTypeRepository;

                int          contentTypeId = _textpageContentType.Id;
                IContentType contentType   = repository.Get(contentTypeId);

                // Act
                bool result = repository.HasContentNodes(contentTypeId);

                Content subpage = ContentBuilder.CreateTextpageContent(contentType, "Test Page 1", contentType.Id);
                DocumentRepository.Save(subpage);

                bool result2 = repository.HasContentNodes(contentTypeId);

                // Assert
                Assert.That(result, Is.False);
                Assert.That(result2, Is.True);
            }
        }