Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CSE 231 Problem Set 06 Each problem in the problem set will start with the following two classes: Problem 34.1: Dummy Create a dummy double

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

CSE 231 Problem Set 06 Each problem in the problem set will start with the following two classes: Problem 34.1: Dummy Create a dummy double for the Velocity class. Problem 34.2: Stub Create two stubs for the Velocity class: One that returns DX,DY of 1.1,2.2, and a second that returns a DX,DY of 11.1, 22.2. Problem 34.4: Spy Create a spy double for the Velocity class. This double will count the number of times that Velocity::getDx () or Velocity: :getDy () are called. Note that this spy double will be a stub that always returns DX,DY=1.1,2.2. Problem 34.5: Spy Utilization Add the following unit test to the TestPosition class: Note that you will also have to call this method from run(). Please modify the above method to include your spy form 34.4. Note that you should add an assert to ensure the expected number of calls to getDx( ) and getDy( ) were performed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Logidata+ Deductive Databases With Complex Objects Lncs 701

Authors: Paolo Atzeni

1st Edition

354056974X, 978-3540569749

More Books

Students also viewed these Databases questions