Some improvements around validation of content/media properties
This commit is contained in:
@@ -13,4 +13,16 @@
|
||||
</Provider>
|
||||
</FileSystemProviders>
|
||||
|
||||
<umbraco>
|
||||
<infrastructure>
|
||||
<repositories>
|
||||
<repositoryMapping interfaceShortTypeName="IContentRepository" repositoryFullTypeName="Umbraco.Core.Persistence.Repositories.ContentRepository, Umbraco.Core" cacheProviderFullTypeName="Umbraco.Core.Persistence.Caching.RuntimeCacheProvider, Umbraco.Core"/>
|
||||
<repositoryMapping interfaceShortTypeName="IContentTypeRepository" repositoryFullTypeName="Umbraco.Core.Persistence.Repositories.ContentTypeRepository, Umbraco.Core" cacheProviderFullTypeName="Umbraco.Core.Persistence.Caching.InMemoryCacheProvider, Umbraco.Core"/>
|
||||
</repositories>
|
||||
<publishingStrategy>
|
||||
<provider type="Umbraco.Web.Publishing.PublishingStrategy, Umbraco.Web" />
|
||||
</publishingStrategy>
|
||||
</infrastructure>
|
||||
</umbraco>
|
||||
|
||||
</configuration>
|
||||
99
src/Umbraco.Tests/Services/ContentServiceTests.cs
Normal file
99
src/Umbraco.Tests/Services/ContentServiceTests.cs
Normal file
@@ -0,0 +1,99 @@
|
||||
using System;
|
||||
using NUnit.Framework;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Tests.TestHelpers;
|
||||
using Umbraco.Web.Services;
|
||||
|
||||
namespace Umbraco.Tests.Services
|
||||
{
|
||||
[TestFixture]
|
||||
public class ContentServiceTests : BaseWebTest
|
||||
{
|
||||
/*[Test]*/
|
||||
public void Can_Create_Content()
|
||||
{
|
||||
// Arrange
|
||||
var contentService = new ContentService();
|
||||
|
||||
// Act
|
||||
IContent content = contentService.CreateContent(-1, "umbTextpage");
|
||||
|
||||
// Assert
|
||||
Assert.That(content, Is.Not.Null);
|
||||
Assert.That(content.HasIdentity, Is.False);
|
||||
}
|
||||
|
||||
/*[Test]*/
|
||||
public void Cannot_Create_Content_With_Non_Existing_ContentType_Alias()
|
||||
{
|
||||
// Arrange
|
||||
var contentService = new ContentService();
|
||||
|
||||
// Act & Assert
|
||||
Assert.Throws<Exception>(() => contentService.CreateContent(-1, "umbAliasDoesntExist"));
|
||||
}
|
||||
|
||||
public void Can_Get_Content_By_Id()
|
||||
{ }
|
||||
|
||||
public void Can_Get_Content_By_Level()
|
||||
{ }
|
||||
|
||||
public void Can_Get_Children_Of_Content_Id()
|
||||
{ }
|
||||
|
||||
public void Can_Get_All_Versions_Of_Content()
|
||||
{ }
|
||||
|
||||
public void Can_Get_Root_Content()
|
||||
{ }
|
||||
|
||||
public void Can_Get_Content_For_Expiration()
|
||||
{ }
|
||||
|
||||
public void Can_Get_Content_For_Release()
|
||||
{ }
|
||||
|
||||
public void Can_Get_Content_In_RecycleBin()
|
||||
{ }
|
||||
|
||||
public void Can_RePublish_All_Content()
|
||||
{ }
|
||||
|
||||
public void Can_Publish_Content()
|
||||
{ }
|
||||
|
||||
public void Can_Publish_Content_Children()
|
||||
{ }
|
||||
|
||||
public void Can_Save_And_Publish_Content()
|
||||
{ }
|
||||
|
||||
public void Can_Save_Content()
|
||||
{ }
|
||||
|
||||
public void Can_Bulk_Save_Content()
|
||||
{ }
|
||||
|
||||
public void Can_Delete_Content_Of_Specific_ContentType()
|
||||
{ }
|
||||
|
||||
public void Can_Delete_Content()
|
||||
{ }
|
||||
|
||||
public void Can_Move_Content_To_RecycleBin()
|
||||
{ }
|
||||
|
||||
public void Can_Move_Content()
|
||||
{ }
|
||||
|
||||
public void Can_Copy_Content()
|
||||
{ }
|
||||
|
||||
public void Can_Send_To_Publication()
|
||||
{ }
|
||||
|
||||
public void Can_Rollback_Version_On_Content()
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -80,6 +80,7 @@
|
||||
<Compile Include="Routing\NiceUrlsProviderWithDomainsTests.cs" />
|
||||
<Compile Include="Routing\uQueryGetNodeIdByUrlTests.cs" />
|
||||
<Compile Include="Routing\UrlsWithNestedDomains.cs" />
|
||||
<Compile Include="Services\ContentServiceTests.cs" />
|
||||
<Compile Include="Surface\PluginControllerAreaTests.cs" />
|
||||
<Compile Include="TestHelpers\BaseRoutingTest.cs" />
|
||||
<Compile Include="GlobalSettingsTests.cs" />
|
||||
|
||||
Reference in New Issue
Block a user