Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ImmichFrame.Core.Tests/Logic/Pool/AlbumAssetsPoolTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private class TestableAlbumAssetsPool(IApiCache apiCache, ImmichApi immichApi, I
public void Setup()
{
_mockApiCache = new Mock<IApiCache>();
_mockImmichApi = new Mock<ImmichApi>("", null);
_mockImmichApi = new Mock<ImmichApi>("", null!);
_mockAccountSettings = new Mock<IAccountSettings>();
_albumAssetsPool = new TestableAlbumAssetsPool(_mockApiCache.Object, _mockImmichApi.Object, _mockAccountSettings.Object);

Expand Down
2 changes: 1 addition & 1 deletion ImmichFrame.Core.Tests/Logic/Pool/AllAssetsPoolTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class AllAssetsPoolTests
public void Setup()
{
_mockApiCache = new Mock<IApiCache>();
_mockImmichApi = new Mock<ImmichApi>(null, null);
_mockImmichApi = new Mock<ImmichApi>("", null!);
_mockAccountSettings = new Mock<IAccountSettings>();
_allAssetsPool = new AllAssetsPool(_mockApiCache.Object, _mockImmichApi.Object, _mockAccountSettings.Object);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class CachingApiAssetsPoolTests
// Concrete implementation for testing the abstract class
private class TestableCachingApiAssetsPool : CachingApiAssetsPool
{
public Func<Task<IEnumerable<AssetResponseDto>>> LoadAssetsFunc { get; set; }
public Func<Task<IEnumerable<AssetResponseDto>>>? LoadAssetsFunc { get; set; }

public TestableCachingApiAssetsPool(IApiCache apiCache, ImmichApi immichApi, IAccountSettings accountSettings)
: base(apiCache, immichApi, accountSettings)
Expand All @@ -39,7 +39,7 @@ protected override Task<IEnumerable<AssetResponseDto>> LoadAssets(CancellationTo
public void Setup()
{
_mockApiCache = new Mock<IApiCache>(); // ILogger, IOptions<AppSettings>
_mockImmichApi = new Mock<ImmichApi>(null, null); // ILogger, IHttpClientFactory, IOptions<AppSettings>
_mockImmichApi = new Mock<ImmichApi>("", null!); // ILogger, IHttpClientFactory, IOptions<AppSettings>
_mockAccountSettings = new Mock<IAccountSettings>();

_testPool = new TestableCachingApiAssetsPool(_mockApiCache.Object, _mockImmichApi.Object, _mockAccountSettings.Object);
Expand Down Expand Up @@ -133,7 +133,7 @@ public async Task AllAssets_UsesCache_LoadAssetsCalledOnce()
};

// Setup cache to really cache after the first call
IEnumerable<AssetResponseDto> cachedValue = null;
IEnumerable<AssetResponseDto>? cachedValue = null;
_mockApiCache.Setup(c => c.GetOrAddAsync(
It.IsAny<string>(),
It.IsAny<Func<Task<IEnumerable<AssetResponseDto>>>>()
Expand Down
Loading
Loading