So, I did some jUnit tests and wanted to write different classes that had similar functionality, but were small enough to write within the same class. Regardless of the design solution, this led me to a compiler error. I'm not sure what the rules are for what I saw.
You can imagine what it will look like
package foo;
@RunWith(Suite.class)
@SuiteClasses({ TestClassOne.class, TestClassTwo.class })
public class TestSuite{
@RunWith(SpringJUnit4ClassRunner.class)
public static class TestClassOne{
}
@RunWith(SpringJUnit4ClassRunner.class)
public static class TestClassTwo{
}
}
Now that the compiler does this, it will say that TestClassOne cannot be resolved to the type. There is an easy way to solve this problem. This would require explicit import of a static class.
import foo.TestSuite.TestClassOne;
import foo.TestSuite.TestClassTwo;
: - , , . , .