1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

Remove Batch (#2274)

This commit is contained in:
Justin Baur
2022-09-14 14:57:05 -04:00
committed by GitHub
parent f848eb2477
commit 735ad264f1
5 changed files with 6 additions and 59 deletions

View File

@ -70,31 +70,6 @@ public class CoreHelpersTests
Assert.Equal(expectedComb, comb);
}
[Theory]
[InlineData(2, 5, new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 })]
[InlineData(2, 3, new[] { 1, 2, 3, 4, 5 })]
[InlineData(2, 1, new[] { 1, 2 })]
[InlineData(1, 1, new[] { 1 })]
[InlineData(2, 2, new[] { 1, 2, 3 })]
public void Batch_Success(int batchSize, int totalBatches, int[] collection)
{
// Arrange
var remainder = collection.Length % batchSize;
// Act
var batches = collection.Batch(batchSize);
// Assert
Assert.Equal(totalBatches, batches.Count());
foreach (var batch in batches.Take(totalBatches - 1))
{
Assert.Equal(batchSize, batch.Count());
}
Assert.Equal(batches.Last().Count(), remainder == 0 ? batchSize : remainder);
}
/*
[Fact]
public void ToGuidIdArrayTVP_Success()