* Fix wrong service name * Move tests to correct place and fix naming * Introducing a test base * Tests IContentBlueprintEditingService * Remove comment * Adding Assert.Multiple * More Assert.Multiple + Can_Create_With_Basic_Model() and Cannot_Create_When_Content_Type_Not_Found()
25 lines
725 B
C#
25 lines
725 B
C#
using NUnit.Framework;
|
|
|
|
namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services;
|
|
|
|
public partial class ContentBlueprintEditingServiceTests
|
|
{
|
|
[TestCase(true)]
|
|
[TestCase(true)]
|
|
public async Task Can_Get(bool variant)
|
|
{
|
|
var blueprint = await (variant ? CreateVariantContentBlueprint() : CreateInvariantContentBlueprint());
|
|
|
|
var result = await ContentBlueprintEditingService.GetAsync(blueprint.Key);
|
|
Assert.IsNotNull(result);
|
|
Assert.AreEqual(blueprint.Key, result.Key);
|
|
}
|
|
|
|
[Test]
|
|
public async Task Cannot_Get_Non_Existing()
|
|
{
|
|
var result = await ContentBlueprintEditingService.GetAsync(Guid.NewGuid());
|
|
Assert.IsNull(result);
|
|
}
|
|
}
|