Files
Umbraco-CMS/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/LegacyScopeProviderTests.cs
Paul Johnson 41a003e20e Ensure legacy scope returned when using legacy scope provider (#12465)
* Separate legacy scope provider interface and explicitly implement.

* Don't rely on legacy scope provider for existing tests.

* Assert correct type returned when using legacy scope provider.
2022-05-24 12:26:28 +02:00

22 lines
674 B
C#

using NUnit.Framework;
using Umbraco.Cms.Tests.Common.Testing;
using Umbraco.Cms.Tests.Integration.Testing;
namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Scoping;
[TestFixture]
[UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerFixture)]
public class LegacyScopeProviderTests : UmbracoIntegrationTest
{
[Test]
public void CreateScope_Always_ReturnsLegacyIScope()
{
var scopeProvider = GetRequiredService<global::Umbraco.Cms.Core.Scoping.IScopeProvider>();
using (var scope = scopeProvider.CreateScope())
{
Assert.IsInstanceOf<global::Umbraco.Cms.Core.Scoping.IScope>(scope);
}
}
}