Files
Umbraco-CMS/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentEditingServiceTests.Get.cs
2023-02-23 07:31:05 +01:00

25 lines
677 B
C#

using NUnit.Framework;
namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services;
public partial class ContentEditingServiceTests
{
[TestCase(true)]
[TestCase(true)]
public async Task Can_Get(bool variant)
{
var content = await (variant ? CreateVariantContent() : CreateInvariantContent());
var result = await ContentEditingService.GetAsync(content.Key);
Assert.IsNotNull(result);
Assert.AreEqual(content.Key, result.Key);
}
[Test]
public async Task Cannot_Get_Non_Existing()
{
var result = await ContentEditingService.GetAsync(Guid.NewGuid());
Assert.IsNull(result);
}
}