mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 08:11:10 +00:00
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:
1 parent
fc800afe03
commit
45c1d1bd44
21 files changed
+354
-22
No files matched your search
+18
@@ -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]
|
||||
|
||||
Reference in new issue
Block a user