Files
Umbraco-CMS/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentBlueprintEditingServiceTests.Get.cs
Elitsa Marinovska 3edc783ddb V14: Additional blueprint endpoints (#16047)
* Fix /item endpoint response when 0 ids

* Adding GetPagedByContentTypeKeyAsync to IContentBlueprintEditingService

* Adding mapping for new DocumentTypeBlueprintItemResponseModel

* New endpoint and operation status handling

* Fix test cases

* Added tests

* Fixed partial test references

* Rename method

* Add ancestors endpoint for blueprints

* Change == to is

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2024-04-15 13:49:08 +02:00

25 lines
726 B
C#

using NUnit.Framework;
namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services;
public partial class ContentBlueprintEditingServiceTests
{
[TestCase(true)]
[TestCase(false)]
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);
}
}