public async Task AssetsController_GetAssets() { using var connection = Database_init(); var options = new DbContextOptionsBuilder <mmpproject2Context>().UseSqlite(connection).Options; using var context = new mmpproject2Context(options); var repo = new AssetRepository(options); var actionResult = await assetsController.GetAsync(); var assets = await repo.GetAllAsync(); var assetsActual = context.Assets.ToList(); foreach (var asset in assets) { Assert.Contains(asset.Id, assetsActual.Select(x => x.Id)); Assert.Contains(asset.Quantity, assetsActual.Select(x => x.Quantity)); } }