-
Notifications
You must be signed in to change notification settings - Fork 5.2k
/
duplicatedDataProviders.java
45 lines (28 loc) · 1.2 KB
/
duplicatedDataProviders.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import org.testng.annotations.*;
import org.testng.annotations.DataProvider;
import java.lang.Object;
import java.lang.String;
import java.util.Iterator;
class DuplicatedTest1 {
@DataProvider
public Object[][] <error descr="Data provider with name 'someTestData' already exists in context">someTestData</error>() {return null;}
@DataProvider(name=<error descr="Data provider with name 'someTestData' already exists in context">"someTestData"</error>)
public Object[][] someTestData2() {return null;}
}
class DuplicatedTest2 {
@DataProvider(name = <error descr="Data provider with name 'asd' already exists in context">"asd"</error>)
public Object[][] someTestData() {return null;}
@DataProvider(name = <error descr="Data provider with name 'asd' already exists in context">"asd"</error>)
public Object[][] someTestData2() {return null;}
}
class NoDuplicationTest {
@DataProvider(name = "qwe")
public Object[][] someTestData() {return null;}
@DataProvider(name = "asd")
public Object[][] someTestData2() {return null;}
}
class NoDuplication2Test {
public Object[][] someTestData() {return null;}
@DataProvider(name = "someTestData")
public Object[][] someTestData2() {return null;}
}