public async Task AssetsController_GetAssetbyID(int id) { 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.GetByIdAsync(id); var asset = await repo.GetAsync(id); var assetActual = context.Assets.Where(x => x.Id == id).Single(); Assert.Equal(asset.Id, assetActual.Id); Assert.Equal(asset.Quantity, assetActual.Quantity); }