Fix Umbraco.Tests.Common warnings. (#17172)

* Fix async warning.

* Fix MediaFileManager warning.

* Fix TypeLoader warning.

* Fix CodeBase warning.

* Fix ContentTypeEditingBuilder warning.

* Fix _containerKey warning.

* Fix _key warning.

* Fix issues due to merge with contrib

---------

Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
This commit is contained in:
Jeroen Breuer
2025-01-03 17:59:50 +01:00
committed by GitHub
parent aaa44a20cb
commit 09575599ad
3 changed files with 4 additions and 5 deletions

View File

@@ -96,8 +96,7 @@ public abstract class TestHelperBase
Mock.Of<IMediaPathScheme>(),
loggerFactory.CreateLogger<MediaFileManager>(),
Mock.Of<IShortStringHelper>(),
Mock.Of<IServiceProvider>(),
Options.Create(new ContentSettings()));
Mock.Of<IServiceProvider>());
var databaseFactory = new Mock<IUmbracoDatabaseFactory>();
var database = new Mock<IUmbracoDatabase>();
var sqlContext = new Mock<ISqlContext>();
@@ -207,7 +206,7 @@ public abstract class TestHelperBase
throw new ArgumentException("relativePath must start with '~/'", nameof(relativePath));
}
var codeBase = typeof(TestHelperBase).Assembly.CodeBase;
var codeBase = typeof(TestHelperBase).Assembly.Location;
var uri = new Uri(codeBase);
var path = uri.LocalPath;
var bin = Path.GetDirectoryName(path);

View File

@@ -8,5 +8,5 @@ namespace Umbraco.Cms.Tests.Common;
public class TestLastChanceFinder : IContentLastChanceFinder
{
public async Task<bool> TryFindContent(IPublishedRequestBuilder frequest) => false;
public Task<bool> TryFindContent(IPublishedRequestBuilder frequest) => Task.FromResult(false);
}