Fix build issues from new Moq version

This commit is contained in:
Patrick Barron 2023-12-08 15:05:20 -05:00
parent 8055d986e0
commit 3b29af21f2
2 changed files with 2 additions and 2 deletions

View file

@ -66,7 +66,7 @@ namespace Jellyfin.Api.Tests.Auth.DefaultAuthorizationPolicy
_userManagerMock
.Setup(u => u.GetUserById(It.IsAny<Guid>()))
.Returns<User?>(null);
.Returns<User?>(_ => null);
var claims = new[]
{

View file

@ -35,7 +35,7 @@ public class FindExtrasTests
var configMock = fixture.Freeze<Mock<IServerConfigurationManager>>();
configMock.Setup(c => c.ApplicationPaths.ProgramDataPath).Returns("/data");
var itemRepository = fixture.Freeze<Mock<IItemRepository>>();
itemRepository.Setup(i => i.RetrieveItem(It.IsAny<Guid>())).Returns<BaseItem>(null);
itemRepository.Setup(i => i.RetrieveItem(It.IsAny<Guid>())).Returns<BaseItem>(null!);
_fileSystemMock = fixture.Freeze<Mock<IFileSystem>>();
_fileSystemMock.Setup(f => f.GetFileInfo(It.IsAny<string>())).Returns<string>(path => new FileSystemMetadata { FullName = path });
_libraryManager = fixture.Build<Emby.Server.Implementations.Library.LibraryManager>().Do(s => s.AddParts(