void (List<String> files) { files.add(0, "refactoring/invertBoolean/" + getTestName(true) + ".before.py"); myFixture.configureByFiles(ArrayUtilRt.toStringArray(files)); final PsiElement element = myFixture.getElementAtCaret(); assertTrue(element instanceof PsiNamedElement); final InvertBooleanAction action = new InvertBooleanAction(); final AnActionEvent event = TestActionEvent.createTestEvent(action); assertTrue(ActionUtil.lastUpdateAndCheckDumb(action, event, true)); assertTrue(event.getPresentation().isEnabledAndVisible()); final PsiNamedElement target = (PsiNamedElement)element; final String name = target.getName(); assertNotNull(name); new InvertBooleanProcessor(target, "not" + StringUtil.toTitleCase(name)).run(); myFixture.checkResultByFile("refactoring/invertBoolean/" + getTestName(true) + ".after.py"); }