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
@@ -175,19 +175,22 @@ public class PumpArchiveRepositoryTest
private static readonly DateTime Now = DateTime.Now;
/// <summary>
/// Verifies that the <c>DeleteBeforeDate</c> repository method removes all records with a date earlier than the specified cutoff, retaining only records dated on or after that cutoff.
/// </summary>
[Test]
public async Task DeleteBeforeDate()
{
var result = await _repository.Collection.FindAsync(_ => true);
Assert.That(result, Is.Not.Null);
Assert.That(result.ToList(), Has.Count.GreaterThan(1));
await _repository.DeleteBeforeDate(Now.AddDays(-1));
var resultDelete = await _repository.Collection.FindAsync(_ => true);
Assert.That(resultDelete, Is.Not.Null);
Assert.That(resultDelete.ToList(), Has.Count.EqualTo(1));
}
public async Task DeleteBeforeDate()
{
var result = await _repository.Collection.FindAsync(_ => true);
Assert.That(result, Is.Not.Null);
Assert.That(result.ToList(), Has.Count.GreaterThan(1));
await _repository.DeleteBeforeDate(Now.AddDays(-1));
var resultDelete = await _repository.Collection.FindAsync(_ => true);
Assert.That(resultDelete, Is.Not.Null);
Assert.That(resultDelete.ToList(), Has.Count.EqualTo(1));
}
}