Skip to content

TestNG features#2

Open
Hanarlo wants to merge 2 commits intomasterfrom
TestNG
Open

TestNG features#2
Hanarlo wants to merge 2 commits intomasterfrom
TestNG

Conversation

@Hanarlo
Copy link
Owner

@Hanarlo Hanarlo commented Jan 9, 2024

No description provided.

public class BaseTest{

Calculator calculator;
@BeforeSuite
Copy link
Collaborator

Choose a reason for hiding this comment

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

Форматирование - тут нужна пустя строка

public class CalculatorTest extends BaseTest{
//обычные
@Test(groups = "smoke", priority = 2, testName = "Делим целые числа")
public void divTestInteger(){
Copy link
Collaborator

Choose a reason for hiding this comment

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

Форматирование - перед фигурной скобкой нужен пробел


@Test(groups = "smoke", priority = 1, testName = "Делим дробные числа")
public void divTestDouble(){
Assert.assertEquals(calculator.div(5.0,2.0), 2.5);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Форматирование - между параметрами метода нужен пробел

//данные через класс
@Test(dataProvider = "provider", dataProviderClass = DataProvider.class, groups = "regression")
public void calcWithParam(int a, int b, Object expect){
Assert.assertEquals(calculator.div(a,b), expect);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Форматирование - между параметрами метода нужен пробел

attempt++;
Assert.assertEquals(calculator.div(4,2), 4);
}

Copy link
Collaborator

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