public void Can_Retrieve_All_Saved_Income_From_Database() { using (var repo = new IncomeRepository(_context)) { _context.Staffs.Add(sampleManager); _context.SaveChanges(); var manager = _context.Staffs.Single(); repo.Create(new Income("income1", 2300, manager.Id)); //repo.Create(new Income("income2", 4300, manager.Id)); Assert.AreEqual(2, repo.GetAllIncome().Count()); } }