Cleans up IIOHelper and removes methods/props that shouldn't exist, changes test helper to use WorkingDirectory fixes some usages of MapPath

This commit is contained in:
Shannon
2020-03-31 17:27:51 +11:00
parent 7617027c49
commit 8535d0fbe3
27 changed files with 154 additions and 193 deletions

View File

@@ -5,6 +5,7 @@ using System.IO;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using NUnit.Framework;
using Umbraco.Configuration.Models;
using Umbraco.Core;
@@ -22,13 +23,16 @@ namespace Umbraco.Tests.Integration.Extensions
/// Creates a LocalDb instance to use for the test
/// </summary>
/// <param name="app"></param>
/// <param name="dbFilePath"></param>
/// <param name="hostEnvironment"></param>
/// <param name="integrationTest"></param>
/// <returns></returns>
public static IApplicationBuilder UseTestLocalDb(this IApplicationBuilder app,
string dbFilePath,
IHostEnvironment hostEnvironment,
UmbracoIntegrationTest integrationTest)
{
var dbFilePath = Path.Combine(hostEnvironment.ContentRootPath, "LocalDb");
// get the currently set db options
var testOptions = TestOptionAttributeBase.GetTestOptions<UmbracoTestAttribute>();