rama creada apartir de master en j

This commit is contained in:
jrojas
2026-06-26 10:29:23 +02:00
parent 319fd3dfb0
commit c1517fda87
2810 changed files with 1927392 additions and 25392 deletions
@@ -62,21 +62,25 @@ public class ObservationArchiveRepositoryTest
private static readonly ObjectId PatientId = ObjectId.GenerateNewId();
/// <summary>
/// Verifies that the repository's <c>DeleteBeforeDate</c> method removes all patient observations
/// dated before the specified cutoff, leaving only a single observation remaining in the collection.
/// </summary>
[Test]
public async Task DeleteBeforeDate()
{
var filter = Builders<PatientObservation>.Filter.Eq(p => p.PatientId, PatientId);
var result = await _repository.Collection.FindAsync(filter);
Assert.That(result, Is.Not.Null);
Assert.That(result.ToList(), Has.Count.GreaterThan(1));
await _repository.DeleteBeforeDate(Now);
var resultDelete = await _repository.Collection.FindAsync(filter);
Assert.That(resultDelete, Is.Not.Null);
Assert.That(resultDelete.ToList(), Has.Count.EqualTo(1));
}
public async Task DeleteBeforeDate()
{
var filter = Builders<PatientObservation>.Filter.Eq(p => p.PatientId, PatientId);
var result = await _repository.Collection.FindAsync(filter);
Assert.That(result, Is.Not.Null);
Assert.That(result.ToList(), Has.Count.GreaterThan(1));
await _repository.DeleteBeforeDate(Now);
var resultDelete = await _repository.Collection.FindAsync(filter);
Assert.That(resultDelete, Is.Not.Null);
Assert.That(resultDelete.ToList(), Has.Count.EqualTo(1));
}
}