void () { PsiClass psiClass = findClass(getModule1(), CLASS_NAME); PsiPackage psiPackage = JUnitUtil.getContainingPackage(psiClass); JUnitConfiguration configuration = new JUnitConfiguration(null, myProject); JUnitConfiguration.Data data = configuration.getPersistentData(); data.PACKAGE_NAME = psiPackage.getQualifiedName(); data.TEST_OBJECT = JUnitConfiguration.TEST_PACKAGE; assertEquals(PACKAGE_NAME, configuration.suggestedName()); data.PACKAGE_NAME = "not.existing.pkg"; assertEquals("not.existing.pkg", configuration.suggestedName()); data.TEST_OBJECT = JUnitConfiguration.TEST_CLASS; data.MAIN_CLASS_NAME = psiClass.getQualifiedName(); assertEquals(SHORT_CLASS_NAME, configuration.suggestedName()); data.MAIN_CLASS_NAME = "not.existing.TestClass"; assertEquals("TestClass", configuration.suggestedName()); data.MAIN_CLASS_NAME = "pkg.TestClass."; assertEquals("pkg.TestClass.", configuration.suggestedName()); data.MAIN_CLASS_NAME = "TestClass"; assertEquals("TestClass", configuration.suggestedName()); data.TEST_OBJECT = JUnitConfiguration.TEST_METHOD; data.MAIN_CLASS_NAME = psiClass.getQualifiedName(); data.METHOD_NAME = METHOD_NAME; assertEquals(SHORT_CLASS_NAME + "." + METHOD_NAME, configuration.suggestedName()); data.MAIN_CLASS_NAME = "not.existing.TestClass"; assertEquals("TestClass." + METHOD_NAME, configuration.suggestedName()); }