Question: Line 1. public void mocks_ test() { Line 2. Purchase mocked Purchase = Easy Mock .mock(Purchase .class); Line 3. expect(mocked Purchase. get Total Cost()).and Return(new
Line 1. public void mocks_ test() { Line 2. Purchase mocked Purchase = Easy Mock .mock(Purchase .class); Line 3. expect(mocked Purchase. get Total Cost()).and Return(new Big Decimal(2)); Line 4. replay(mocked Purchase); Line 5. Daily Purchases daily Purchases = new Daily Orders (mocked Purchase); Line 6. assert That(daily Purchases. get Total Cost()).is Equal To(new Big Decimal(2)); Line 7. Easy Mock. verify(mocked Purchase); Line 8. } The behavior of the mock test is defined in which line?
Step by Step Solution
There are 3 Steps involved in it
The behavior of the mock test is defined in line C which is Line 3 In l... View full answer
Get step-by-step solutions from verified subject matter experts
