Skip to content

Tests Качалин Дмитрий#6

Open
DmitryNiwa wants to merge 5 commits into48x:masterfrom
DmitryNiwa:master
Open

Tests Качалин Дмитрий#6
DmitryNiwa wants to merge 5 commits into48x:masterfrom
DmitryNiwa:master

Conversation

@DmitryNiwa
Copy link

No description provided.

public void TestIfEverythingIsNormal(){
int startingNumber = 100;
int itemsCount = 300;
ClassToBeTested.generateIntSequence(startingNumber, itemsCount);
Copy link
Owner

Choose a reason for hiding this comment

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

Тест без проверок - плохой тест. Но кейс нормальный. Надо добавить assert'ы

int startingNumber = Integer.MAX_VALUE - 2;
int itemsCount = 2;
ClassToBeTested.generateIntSequence( startingNumber, itemsCount);
assertEquals(startingNumber + itemsCount,Integer.MAX_VALUE);
Copy link
Owner

Choose a reason for hiding this comment

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

Очень странная проверка, которая никак не связана с функциональностью тестируемого метода.
Надо проверить результат, который отдал тестовый метод. Но кейс, опять-таки, хороший

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