2024-04-04 09:40:06 +02:00
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services;
|
|
|
|
|
|
|
|
|
|
public partial class ContentBlueprintEditingServiceTests
|
|
|
|
|
{
|
|
|
|
|
[TestCase(true)]
|
2024-04-15 13:49:08 +02:00
|
|
|
[TestCase(false)]
|
2024-04-04 09:40:06 +02:00
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|