Enefaxotota
New Member
I have methods like this:\[code\]public static bool ChangeCaseEstimatedHours(int caseID, decimal? time) { Case c = Cases.Get(caseID); if (c != null) { c.EstimatedHours = time; return Cases.Update(c); } return false; } public static bool RemoveCase(int caseID) { return Cases.Remove(caseID); }\[/code\]which internally uses LINQ to do the queries.I am wondering how I should go about testing these. They do not have a state so they are static. They also modify the database.Thus, I would have to create a case, then remove it in the same test, but a unit test should only be doing 1 thing. What is usually done in these situations?How do I test database queries, updates and deletes?Thanks