Skip to content

Commit

Permalink
refactor fixture tests (via #8)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehborisov authored and baev committed Feb 24, 2017
1 parent 1fad378 commit 74bbf96
Show file tree
Hide file tree
Showing 12 changed files with 269 additions and 139 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package io.qameta.allure.samples;

import io.qameta.allure.Step;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

/**
* @author Egor Borisov ehborisov@gmail.com
*/
public class PerMethodFixtures {

@BeforeMethod
public void beforeMethod1() {
step();
}

@BeforeMethod
public void beforeMethod2() {
step();
}

@Test
public void test1() {
step();
}

@Test
public void test2() {
step();
}

@AfterMethod
public void afterMethod1() {
step();
}

@AfterMethod
public void afterMethod2() {
step();
}

@Step
public void step() {

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package io.qameta.allure.samples;

import io.qameta.allure.Step;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.Test;

/**
* @author Egor Borisov ehborisov@gmail.com
*/
public class PerSuiteFixtures {

@BeforeSuite
public void beforeSuite1() {
step();
}

@BeforeSuite
public void beforeSuite2() {
step();
}

@Test
public void test() {
step();
}

@AfterSuite
public void afterSuite1() {
step();
}

@AfterSuite
public void afterSuite2() {
step();
}

@Step
public void step(){

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package io.qameta.allure.samples;

import io.qameta.allure.Step;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;

/**
* @author Egor Borisov ehborisov@gmail.com
*/
public class TestTagFixtures {

@BeforeTest
public void beforeTest1() {
step();
}

@BeforeTest
public void beforeTest2() {
step();
}

@Test
public void test() {
step();
}

@AfterTest
public void afterTest1() {
step();
}

@AfterTest
public void afterTest2() {
step();
}

@Step
public void step() {

}
}
Loading

0 comments on commit 74bbf96

Please sign in to comment.