public void TestDelete() { bool hasRecord = false; DataRepo.DeleteData(1); List <TextFileModel> files = DataRepo.GetData(); foreach (TextFileModel file in files) { string name = file.NoteName; string text = file.NoteText; int id = file.NoteID; TestContext.WriteLine(id + " " + text + " " + name); if (id == 1) { hasRecord = true; } } Assert.AreEqual(false, hasRecord); }