We’ll be using a few of the assertions to test our Donut functions. The first test function checks the total count of donuts in the order. For this, we will use ‘assertEquals’ because we know the value of the total number of donuts that we’ve added to our order, which is 5, and we will test it against the function in the Donut class.
Similarly, we test if the function would return 0 if there aren’t any donuts in the order.