Changes necessary for migrating old tests
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Membership;
|
||||
|
||||
namespace Umbraco.Tests.TestHelpers.Entities
|
||||
{
|
||||
@@ -1,12 +1,16 @@
|
||||
using Umbraco.Core.Models.Membership;
|
||||
using Umbraco.Core.Strings;
|
||||
|
||||
namespace Umbraco.Tests.TestHelpers.Entities
|
||||
{
|
||||
public class MockedUserGroup
|
||||
{
|
||||
internal static UserGroup CreateUserGroup(string suffix = "", string[] permissions = null, string[] allowedSections = null)
|
||||
public static IShortStringHelper ShortStringHelper { get; } =
|
||||
new DefaultShortStringHelper(new DefaultShortStringHelperConfig());
|
||||
|
||||
public static UserGroup CreateUserGroup(string suffix = "", string[] permissions = null, string[] allowedSections = null)
|
||||
{
|
||||
var group = new UserGroup(TestHelper.ShortStringHelper)
|
||||
var group = new UserGroup(ShortStringHelper)
|
||||
{
|
||||
Alias = "testUserGroup" + suffix,
|
||||
Name = "TestUserGroup" + suffix,
|
||||
@@ -99,10 +99,11 @@ namespace Umbraco.Tests.Integration.Extensions
|
||||
break;
|
||||
case UmbracoTestOptions.Database.NewSchemaPerFixture:
|
||||
|
||||
throw new NotImplementedException();
|
||||
// New DB + Schema
|
||||
var newSchemaFixtureDbId = db.AttachSchema();
|
||||
|
||||
//// Add teardown callback
|
||||
//integrationTest.OnFixtureTearDown(() => db.Detach());
|
||||
// Add teardown callback
|
||||
integrationTest.OnFixtureTearDown(() => db.Detach(newSchemaFixtureDbId));
|
||||
|
||||
break;
|
||||
case UmbracoTestOptions.Database.NewEmptyPerFixture:
|
||||
|
||||
@@ -19,6 +19,7 @@ using Umbraco.Tests.Testing;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
using Umbraco.Core.Cache;
|
||||
using Umbraco.Core.PropertyEditors;
|
||||
using Umbraco.Tests.Common.TestHelpers.Entities;
|
||||
using Umbraco.Tests.LegacyXmlPublishedCache;
|
||||
|
||||
namespace Umbraco.Tests.Services
|
||||
|
||||
@@ -13,8 +13,10 @@ using Umbraco.Tests.TestHelpers.Entities;
|
||||
using Umbraco.Core.Persistence.Querying;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Core.Services.Implement;
|
||||
using Umbraco.Tests.Common.TestHelpers.Entities;
|
||||
using Umbraco.Tests.Testing;
|
||||
using Umbraco.Web.Actions;
|
||||
using MockedUser = Umbraco.Tests.TestHelpers.Entities.MockedUser;
|
||||
|
||||
|
||||
namespace Umbraco.Tests.Services
|
||||
|
||||
Reference in New Issue
Block a user