Edge Case
noun
say it: “EJ kays” /ɛdʒ keɪs/
A test value at a limit or just past it, where bugs most often hide.
What is Edge Case?
Edge Case — A test value right at a limit or just past it: zero items, the very last day, or the 5th and the 6th book when a member may borrow 5. Bugs gather at edges, so good tests check both sides of every limit.
[TestMethod]
[DataRow(5, true)] // exactly at the limit
[DataRow(6, false)] // one past it
public void CanBorrow_AtTheLimit(int books, bool expected) =>
Assert.AreEqual(expected, Library.CanBorrow(books));
In a sentence
- “We added an edge case test for the sixth book, one past the borrowing limit.”
Level: Apprentice · More Unit Testing terms at this level
Updated