Skip to content

Commit

Permalink
Testcase for "Change modifiers" removes generic type information #61
Browse files Browse the repository at this point in the history
  • Loading branch information
markiewb committed Apr 16, 2015
1 parent ec633bb commit b6891a9
Showing 1 changed file with 17 additions and 0 deletions.
Expand Up @@ -5,6 +5,23 @@

public class MakePackageProtectedTest {

@Test
public void testPreserveGenerics_PublicMethod() throws Exception {
HintTest.create().setCaretMarker('|')
.sourceLevel("1.6")
.input("package test;\n"
+ "public class Test {\n"
+ " public <T extends java.lang.Number> java.util.Set<T> fi|nd(){return null;};\n"
+ "}\n")
.run(MakePackageProtected.class)
.findWarning("2:59-2:59:hint:" + Bundle.ERR_MakePackageProtected())
.applyFix()
.assertOutput("package test;\n"
+ "public class Test {\n"
+ " <T extends java.lang.Number> java.util.Set<T> find(){return null;};\n"
+ "}\n");
}

@Test
public void testFixWorking_Private_Field() throws Exception {
HintTest.create().setCaretMarker('|')
Expand Down

0 comments on commit b6891a9

Please sign in to comment.