void (FindModel model, Project project, VirtualFile directory, Module module, boolean shouldBeProjectScope, String expectedDirectoryName, String expectedModuleName, boolean shouldBeCustomScope) { MapDataContext dataContext = new MapDataContext(); dataContext.put(CommonDataKeys.PROJECT, project); dataContext.put(CommonDataKeys.VIRTUAL_FILE, directory); dataContext.put(LangDataKeys.MODULE_CONTEXT, module); FindInProjectUtil.setDirectoryName(model, dataContext); assertEquals(shouldBeProjectScope, model.isProjectScope()); assertEquals(expectedDirectoryName, model.getDirectoryName()); assertEquals(expectedModuleName, model.getModuleName()); assertEquals(shouldBeCustomScope, model.isCustomScope()); }