more java tests moved to community

This commit is contained in:
Alexey Kudravtsev
2010-06-25 12:46:40 +04:00
parent 735a9d17a8
commit 2718da9fc7
1139 changed files with 14287 additions and 0 deletions
@@ -0,0 +1,15 @@
// "Create Constructor" "true"
public class Test {
public static void main() {
new MyCollection(10);
}
}
class MyCollection {
public MyCollection() {
}
public MyCollection(int i) {
<selection>//To change body of created methods use File | Settings | File Templates.</selection>
}
}
@@ -0,0 +1,12 @@
// "Create Constructor" "true"
public class Test {
public void main2() {
new MyCollection(this);
}
}
class MyCollection {
public MyCollection(Test test) {
<selection>//To change body of created methods use File | Settings | File Templates.</selection>
}
}
@@ -0,0 +1,15 @@
// "Create Constructor" "true"
class Outer {
public Outer(String s) {
}
void method(Outer other) {
other.new CreateConstructorFromUsage("parameter"); // invoke "Create Constructor" quick fix here
}
class CreateConstructorFromUsage {
public CreateConstructorFromUsage(String s) {
<selection>//To change body of created methods use File | Settings | File Templates.</selection>
}
}
}
@@ -0,0 +1,13 @@
// "Create Constructor" "true"
class Test {
public void t() {
new Inner("a"){};
}
class Inner {
public Inner(String s) {
<selection>//To change body of created methods use File | Settings | File Templates.</selection><caret>
}
}
}
@@ -0,0 +1,11 @@
// "Create Constructor" "true"
public class Test {
public static void main() {
new My<caret>Collection(10);
}
}
class MyCollection {
public MyCollection() {
}
}
@@ -0,0 +1,9 @@
// "Create Constructor" "true"
public class Test {
public void main2() {
new <caret>MyCollection(this);
}
}
class MyCollection {
}
@@ -0,0 +1,12 @@
// "Create Constructor" "true"
class Outer {
public Outer(String s) {
}
void method(Outer other) {
other.new <caret>CreateConstructorFromUsage("parameter"); // invoke "Create Constructor" quick fix here
}
class CreateConstructorFromUsage {
}
}
@@ -0,0 +1,10 @@
// "Create Constructor" "true"
class Test {
public void t() {
new Inner(<caret>"a"){};
}
class Inner {
}
}