VyacheslavRadyuk / sf-senla-courses

0 stars 0 forks source link

2.7.2 Mocks should not be combined this way #95

Closed NikitaErmakSenla closed 3 years ago

NikitaErmakSenla commented 3 years ago

https://github.com/VyacheslavRadyuk/sf-senla-courses/blob/0bd2c1fa560504775a81879a00056352e125ad52/lecture_2.7/WeatherForecastHttpCalloutMock.cls#L9

NikitaErmakSenla commented 3 years ago

Options: 1, Create several classes (inner classes?) for each Mock type;

  1. Use class Contructor to define Mock type. BUT you should avoid situation where Mock has error Status Code bud have 'good' response body
VyacheslavRadyuk commented 3 years ago

done