Skip to content

Krestol 01 bob#3

Open
Krestol wants to merge 17 commits intokrestol_masterfrom
krestol_01_bob
Open

Krestol 01 bob#3
Krestol wants to merge 17 commits intokrestol_masterfrom
krestol_01_bob

Conversation

@Krestol
Copy link
Collaborator

@Krestol Krestol commented Apr 30, 2018

Krestol task 1

EXPECT_EQ("Sure.", BobAnswer("?"));
}

TEST(Bobtest, BobAnswer_input_exclamation_mark_return_Whoa_chill_out)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вторым тестом должен был быть, что знак вопроса не один в in строка, например
"How are you?"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

причины по которым сделал так:
Тест не был бы красным.
Такой тест я добавил на том этапе, когда он сфейлился бы

return "Sure.";
}
else if (tellBob == "!")
else if (tellBob.back() == '!')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это исправление должно было быть раньше, еще до написания тестов с 'Whatever.'

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

до появления тестов с Whatever не возможно было провести этот рефакторинг, т.к. "Whoa, chill out!" возвращался в else.

EXPECT_EQ("Fine. Be that way!", BobAnswer(""));
}

TEST(Bobtest, BobAnswer_input_qwerty_return_Whateve)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ошибка в названии - Whatever

}

if (tellBob.back() == '?')
switch (tellBob.back())
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

рефакторить можно было чуть раньше

driverdevteam pushed a commit that referenced this pull request May 9, 2018
MaxKrabio pushed a commit that referenced this pull request Jun 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants