Migrate UnitOfWorkTests
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
using System;
|
||||
using NUnit.Framework;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Tests.TestHelpers;
|
||||
using Umbraco.Tests.Integration.Testing;
|
||||
using Umbraco.Tests.Testing;
|
||||
|
||||
namespace Umbraco.Tests.Persistence
|
||||
namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence
|
||||
{
|
||||
[TestFixture]
|
||||
[UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)]
|
||||
public class UnitOfWorkTests : TestWithDatabaseBase
|
||||
public class UnitOfWorkTests : UmbracoIntegrationTest
|
||||
{
|
||||
[Test]
|
||||
public void ReadLockNonExisting()
|
||||
{
|
||||
var provider = TestObjects.GetScopeProvider(LoggerFactory);
|
||||
var provider = ScopeProvider;
|
||||
Assert.Throws<ArgumentException>(() =>
|
||||
{
|
||||
using (var scope = provider.CreateScope())
|
||||
@@ -27,7 +27,7 @@ namespace Umbraco.Tests.Persistence
|
||||
[Test]
|
||||
public void ReadLockExisting()
|
||||
{
|
||||
var provider = TestObjects.GetScopeProvider(LoggerFactory);
|
||||
var provider = ScopeProvider;
|
||||
using (var scope = provider.CreateScope())
|
||||
{
|
||||
scope.ReadLock(Constants.Locks.Servers);
|
||||
@@ -38,7 +38,7 @@ namespace Umbraco.Tests.Persistence
|
||||
[Test]
|
||||
public void WriteLockNonExisting()
|
||||
{
|
||||
var provider = TestObjects.GetScopeProvider(LoggerFactory);
|
||||
var provider = ScopeProvider;
|
||||
Assert.Throws<ArgumentException>(() =>
|
||||
{
|
||||
using (var scope = provider.CreateScope())
|
||||
@@ -52,7 +52,7 @@ namespace Umbraco.Tests.Persistence
|
||||
[Test]
|
||||
public void WriteLockExisting()
|
||||
{
|
||||
var provider = TestObjects.GetScopeProvider(LoggerFactory);
|
||||
var provider = ScopeProvider;
|
||||
using (var scope = provider.CreateScope())
|
||||
{
|
||||
scope.WriteLock(Constants.Locks.Servers);
|
||||
@@ -200,7 +200,6 @@
|
||||
<Compile Include="Persistence\LocksTests.cs" />
|
||||
<Compile Include="Migrations\PostMigrationTests.cs" />
|
||||
<Compile Include="Persistence\NPocoTests\NPocoSqlExtensionsTests.cs" />
|
||||
<Compile Include="Persistence\UnitOfWorkTests.cs" />
|
||||
<Compile Include="Testing\UmbracoTestBase.cs" />
|
||||
<Compile Include="TestHelpers\TestObjects-Mocks.cs" />
|
||||
<Compile Include="TestHelpers\TestObjects.cs" />
|
||||
|
||||
Reference in New Issue
Block a user