Add aggregate voter registration management
This commit is contained in:
1 parent
6d765ac8f3
commit
e96a56314f
13 files changed
+1334
-7
No files matched your search
@@ -63,6 +63,16 @@ public sealed class PersistenceModelTests
|
||||
Assert.Contains(entity.GetIndexes(), x => x.Properties.Select(p => p.Name).SequenceEqual(new[] { nameof(VoterProfile.RegionId), nameof(VoterProfile.Status), nameof(VoterProfile.DisplayName) }));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Aggregate_registration_is_region_unique_and_has_no_identity_fields()
|
||||
{
|
||||
var options = new DbContextOptionsBuilder<ElectionDbContext>().UseInMemoryDatabase(Guid.NewGuid().ToString()).Options;
|
||||
using var context = new ElectionDbContext(options);
|
||||
var entity = context.Model.FindEntityType(typeof(VoterRegistrationAggregate))!;
|
||||
Assert.Contains(entity.GetIndexes(), x => x.IsUnique && x.Properties.Single().Name == nameof(VoterRegistrationAggregate.RegionId));
|
||||
Assert.DoesNotContain(typeof(VoterRegistrationAggregate).GetProperties(), x => x.Name.Contains("Name", StringComparison.OrdinalIgnoreCase) || x.Name.Contains("Number", StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task AreaCity_import_preserves_parent_chain_and_four_levels()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user