Covers the SSD content setting with tests

Adds domain, mapping, endpoint, persistence, discovery, and hashing coverage, including parallel and sequential read behavior.
This commit is contained in:
BinaryAlley committed 2026-10-30 22:40:41 +02:00
1 parent fc800afe03
commit 45c1d1bd44
21 files changed
+354 -22

No files matched your search

@@ -62,6 +62,7 @@ public class LibraryConfigurationTests
IProperty downloadMetadataProperty = entityType.GetProperty(nameof(LibraryEntity.CanDownloadMetadataFromWeb));
IProperty shouldTrackConsumptionProgressProperty = entityType.GetProperty(nameof(LibraryEntity.ShouldTrackConsumptionProgress));
IProperty completionThresholdPercentageProperty = entityType.GetProperty(nameof(LibraryEntity.CompletionThresholdPercentage));
IProperty isContentOnSsdProperty = entityType.GetProperty(nameof(LibraryEntity.IsContentOnSsd));
// Assert
Assert.False(titleProperty.IsNullable);
@@ -76,6 +77,23 @@ public class LibraryConfigurationTests
Assert.Equal(typeof(int?), completionThresholdPercentageProperty.ClrType);
Assert.True(completionThresholdPercentageProperty.IsNullable);
Assert.Null(completionThresholdPercentageProperty.GetDefaultValue());
Assert.Equal(typeof(bool), isContentOnSsdProperty.ClrType);
Assert.False(isContentOnSsdProperty.IsNullable);
Assert.Equal(false, isContentOnSsdProperty.GetDefaultValue());
}
[Fact]
public void Configure_WhenApplied_ShouldConfigureSsdContentColumnOrder()
{
// Arrange
IEntityType entityType = DesignTimeModel.FindEntityType(typeof(LibraryEntity))!;
// Act
IProperty isContentOnSsdProperty = entityType.GetProperty(nameof(LibraryEntity.IsContentOnSsd));
// Assert
Assert.Equal(18, isContentOnSsdProperty.GetColumnOrder());
Assert.Equal(nameof(LibraryEntity.IsContentOnSsd), isContentOnSsdProperty.GetColumnName());
}
[Fact]