Qtr No. 213, New Town Yehlanka Indore 454775
Which of the below code should be placed inside test() for testing whether on calling reset(), speed is set to 0?
class Race{
int speed=20;
void reset() => speed=0;
}
test( 'Speed should reset to 0', () {
/* Your code goes here */
});
final race = Race();
race.reset();
expect(race.speed, 0);
Race.reset();
expect(race.speed,0);
final race = Race();
race.reset();
expect(race.speed==0);
final race = Race();
race.reset();
if(race.speed ==0)
return true
else
return false
To get all Infosys Certified Flutter Developer Exam questions Join Group https://bit.ly/infy_premium_group
We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.
Qtr No. 213, New Town Yehlanka Indore 454775
admin@prepflix.in