Test data for UseSingletonRule
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@126 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
13
pmd/test-data/design/UseSingleton1.java
Normal file
13
pmd/test-data/design/UseSingleton1.java
Normal file
@ -0,0 +1,13 @@
|
||||
public class UseSingleton1
|
||||
{
|
||||
// Should trigger UseSingleton rule?
|
||||
public UseSingleton1() { }
|
||||
|
||||
public static void doSomething() {
|
||||
// Blah, blah, blah.
|
||||
}
|
||||
|
||||
public static void main(String args[]) {
|
||||
doSomething();
|
||||
}
|
||||
}
|
9
pmd/test-data/design/UseSingleton2.java
Normal file
9
pmd/test-data/design/UseSingleton2.java
Normal file
@ -0,0 +1,9 @@
|
||||
public class UseSingleton2
|
||||
{
|
||||
// Should not trigger UseSingleton rule.
|
||||
public UseSingleton2() { }
|
||||
|
||||
public void doSomething() { }
|
||||
|
||||
public static void main(String args[]) { }
|
||||
}
|
7
pmd/test-data/design/UseSingleton3.java
Normal file
7
pmd/test-data/design/UseSingleton3.java
Normal file
@ -0,0 +1,7 @@
|
||||
public class UseSingleton3
|
||||
{
|
||||
// Should trigger it.
|
||||
public static void doSomething1() { }
|
||||
public static void doSomething2() { }
|
||||
public static void doSomething3() { }
|
||||
}
|
Reference in New Issue
Block a user