mirror of
https://github.com/bitwarden/server.git
synced 2025-07-03 00:52:49 -05:00
Revert filescoped (#2227)
* Revert "Add git blame entry (#2226)" This reverts commit239286737d
. * Revert "Turn on file scoped namespaces (#2225)" This reverts commit34fb4cca2a
.
This commit is contained in:
@ -6,34 +6,35 @@ using Xunit;
|
||||
using EfRepo = Bit.Infrastructure.EntityFramework.Repositories;
|
||||
using SqlRepo = Bit.Infrastructure.Dapper.Repositories;
|
||||
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories;
|
||||
|
||||
public class TaxRateRepositoryTests
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories
|
||||
{
|
||||
[CiSkippedTheory, EfTaxRateAutoData]
|
||||
public async void CreateAsync_Works_DataMatches(
|
||||
TaxRate taxRate,
|
||||
TaxRateCompare equalityComparer,
|
||||
List<EfRepo.TaxRateRepository> suts,
|
||||
SqlRepo.TaxRateRepository sqlTaxRateRepo
|
||||
)
|
||||
public class TaxRateRepositoryTests
|
||||
{
|
||||
var savedTaxRates = new List<TaxRate>();
|
||||
foreach (var sut in suts)
|
||||
[CiSkippedTheory, EfTaxRateAutoData]
|
||||
public async void CreateAsync_Works_DataMatches(
|
||||
TaxRate taxRate,
|
||||
TaxRateCompare equalityComparer,
|
||||
List<EfRepo.TaxRateRepository> suts,
|
||||
SqlRepo.TaxRateRepository sqlTaxRateRepo
|
||||
)
|
||||
{
|
||||
var i = suts.IndexOf(sut);
|
||||
var postEfTaxRate = await sut.CreateAsync(taxRate);
|
||||
sut.ClearChangeTracking();
|
||||
var savedTaxRates = new List<TaxRate>();
|
||||
foreach (var sut in suts)
|
||||
{
|
||||
var i = suts.IndexOf(sut);
|
||||
var postEfTaxRate = await sut.CreateAsync(taxRate);
|
||||
sut.ClearChangeTracking();
|
||||
|
||||
var savedTaxRate = await sut.GetByIdAsync(postEfTaxRate.Id);
|
||||
savedTaxRates.Add(savedTaxRate);
|
||||
var savedTaxRate = await sut.GetByIdAsync(postEfTaxRate.Id);
|
||||
savedTaxRates.Add(savedTaxRate);
|
||||
}
|
||||
|
||||
var sqlTaxRate = await sqlTaxRateRepo.CreateAsync(taxRate);
|
||||
var savedSqlTaxRate = await sqlTaxRateRepo.GetByIdAsync(sqlTaxRate.Id);
|
||||
savedTaxRates.Add(savedSqlTaxRate);
|
||||
|
||||
var distinctItems = savedTaxRates.Distinct(equalityComparer);
|
||||
Assert.True(!distinctItems.Skip(1).Any());
|
||||
}
|
||||
|
||||
var sqlTaxRate = await sqlTaxRateRepo.CreateAsync(taxRate);
|
||||
var savedSqlTaxRate = await sqlTaxRateRepo.GetByIdAsync(sqlTaxRate.Id);
|
||||
savedTaxRates.Add(savedSqlTaxRate);
|
||||
|
||||
var distinctItems = savedTaxRates.Distinct(equalityComparer);
|
||||
Assert.True(!distinctItems.Skip(1).Any());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user