🔗 Approval Tests
Approval Tests - Home Unit testing asserts can be difficult to use. Approval tests simplify this by taking a snapshot of the results, and confirming that they have not changed. Interesting approach to testing using Combination Approvals: @Test public void upateQuality() throws Exception { CombinationApprovals.verifyAllCombinations( this::doUpdateQuality, new String []{"foo", "bar", "baz"}, new Integer []{-1, 0, 11}, new Integer[0, 1, 49, 50}); } private String doUpdateQuality(String name, int sellIn, int quality) { /*....