| org.netbeans.modules.apisupport.project.TestBase
All known Subclasses: org.netbeans.modules.apisupport.project.ui.platform.NbPlatformCustomizerSourcesTest, org.netbeans.modules.apisupport.project.queries.SourceLevelQueryImplTest, org.netbeans.modules.apisupport.project.jnlp.GenerateJNLPApplicationTest, org.netbeans.modules.apisupport.project.queries.SourceForBinaryImplTest, org.netbeans.modules.apisupport.project.ui.UnitTestLibrariesNodeTest, org.netbeans.modules.apisupport.project.universe.ModuleListTest, org.netbeans.modules.apisupport.project.metainf.ServiceNodeHandlerTest, org.netbeans.modules.apisupport.project.ui.customizer.SingleModulePropertiesTest, org.netbeans.modules.apisupport.project.ui.LibrariesNodeTest, org.netbeans.modules.apisupport.project.ui.ModuleActionsTest, org.netbeans.modules.apisupport.project.AvoidModuleListInProjectConstructorTest, org.netbeans.modules.apisupport.project.UtilTest, org.netbeans.modules.apisupport.project.suite.SuiteSubprojectProviderImplTest, org.netbeans.modules.apisupport.project.TestBuildCleanTest, org.netbeans.modules.apisupport.project.ui.customizer.SuiteCustomizerModuleListTest, org.netbeans.modules.apisupport.project.queries.JavadocForBinaryImplTest, org.netbeans.modules.apisupport.project.BuildPaintapplicationTest, org.netbeans.modules.apisupport.project.ui.customizer.CustomizerLibrariesTest, org.netbeans.modules.apisupport.project.ui.SuiteOperationsTest, org.netbeans.modules.apisupport.project.universe.LocalizedBundleInfoTest, org.netbeans.modules.apisupport.project.queries.UpdateTrackingFileOwnerQueryTest, org.netbeans.modules.apisupport.project.suite.BuildZipDistributionTest, org.netbeans.modules.apisupport.project.universe.TestModuleDependencyTest, org.netbeans.modules.apisupport.project.BuildFeedreaderTest, org.netbeans.modules.apisupport.project.suite.BuildNBMSTest, org.netbeans.modules.apisupport.project.ui.customizer.SuiteUtilsTest, org.netbeans.modules.apisupport.project.ui.customizer.AddModuleFilterTest, org.netbeans.modules.apisupport.project.NbModuleProjectGeneratorTest, org.netbeans.modules.apisupport.project.ProjectXMLManagerTest, org.netbeans.modules.apisupport.project.ui.customizer.SuitePropertiesTest, org.netbeans.modules.apisupport.project.queries.ClassPathProviderImplTest, org.netbeans.modules.apisupport.project.EvaluatorTest, org.netbeans.modules.apisupport.project.ui.ModuleOperationsTest, org.netbeans.modules.apisupport.project.ui.customizer.AddModulePanelTest, org.netbeans.modules.apisupport.project.universe.NbPlatformTest, org.netbeans.modules.apisupport.project.universe.TestEntryTest, org.netbeans.modules.apisupport.project.queries.AntArtifactProviderImplTest, org.netbeans.modules.apisupport.project.CompilationDependencyTest, org.netbeans.modules.apisupport.project.ui.customizer.ModuleDependencyTest, org.netbeans.modules.apisupport.project.ManifestManagerTest, org.netbeans.modules.apisupport.project.NbModuleProjectTest, org.netbeans.modules.apisupport.project.suite.BrandingSupportTest, org.netbeans.modules.apisupport.project.queries.GlobalJavadocForBinaryImplTest, org.netbeans.modules.apisupport.project.ui.SuiteLogicalViewTest, org.netbeans.modules.apisupport.project.metainf.ServiceTest, org.netbeans.modules.apisupport.project.queries.UnitTestForSourceQueryImplTest, org.netbeans.modules.apisupport.project.ui.platform.PlatformComponentFactoryTest, org.netbeans.modules.apisupport.project.ui.ModuleLogicalViewTest, org.netbeans.modules.apisupport.project.queries.GlobalSourceForBinaryImplTest, org.netbeans.modules.apisupport.project.queries.SubprojectProviderImplTest, org.netbeans.modules.apisupport.project.queries.AccessibilityQueryImplTest, org.netbeans.modules.apisupport.project.NbModuleProviderTest, org.netbeans.modules.apisupport.project.suite.SuiteProjectGeneratorTest,
TestBase | abstract public class TestBase extends NbTestCase (Code) | | Basic setup for all the tests.
author: Jesse Glick, Martin Krauskopf |
Method Summary | |
public static void | assertAsynchronouslyUpdatedChildrenNodes(Node node, int n) Fails with timeout if children are not updated to the required count. | protected File | copyFolder(File d) Make a temporary copy of a whole folder into some new dir in the scratch area. | public static void | createJar(File jar, Map contents, Manifest manifest) Create a fresh JAR file. | public static void | delete(File f) | public static void | dump(FileObject f, String contents) | public static void | dump(File f, String contents) | protected static File | file(File root, String path) | protected File | file(String path) Calls in turn
TestBase.file(File,String) with
TestBase.nbrootF as the
first parameter. | public NbModuleProject | generateStandaloneModule(String prjDir) Calls in turn
TestBase.generateStandaloneModule(FileString) with the
TestBase.getWorkDir() as a first parameter. | public static NbModuleProject | generateStandaloneModule(File workDir, String prjDir) Returns
NbModuleProject created in the
TestBase.getWorkDir() /prjDir with code name base default to org.example +
dotted prjDir which is also used as the default package so
the layer and bundle are generated accordingly. | public static FileObject | generateStandaloneModuleDirectory(File workDir, String prjDir) The same as
TestBase.generateStandaloneModule(File,String) but without
opening a generated project. | public SuiteProject | generateSuite(String prjDir) Calls in turn
TestBase.generateSuite(FileString) with the
TestBase.getWorkDir() as a first parameter. | public static SuiteProject | generateSuite(File workDir, String prjDir) Generates an empty suite which has the default platform set. | public static SuiteProject | generateSuite(File workDir, String prjDir, String platformID) Generates an empty suite. | public static NbModuleProject | generateSuiteComponent(SuiteProject suiteProject, String prjDir) Generates a suite component module which becomes a part of the given
suiteProject . | public static NbModuleProject | generateSuiteComponent(SuiteProject suiteProject, File parentDir, String prjDir) Generates a suite component module which becomes a part of the given
suiteProject . | public static File | initializeBuildProperties(File workDir, File dataDir) Sets up global build.properties for the default platform. | public static void | makePlatform(File d) | protected FileObject | nbRoot() | protected File | nbRootFile() | protected FileObject | resolveEEP(String relativePath) | protected File | resolveEEPFile(String relativePath) | protected String | resolveEEPPath(String relativePath) | protected void | setUp() | public static String | slurp(FileObject fileObject) | public static String | slurp(File file) | protected void | tearDown() |
CLUSTER_APISUPPORT | final public static String CLUSTER_APISUPPORT(Code) | | |
CLUSTER_ENTERPRISE | final public static String CLUSTER_ENTERPRISE(Code) | | |
CLUSTER_PLATFORM | final public static String CLUSTER_PLATFORM(Code) | | |
destDirF | protected File destDirF(Code) | | Represents destination directory with NetBeans (always available).
|
noDataDir | protected static boolean noDataDir(Code) | | sample projects doesn't have datadir
|
assertAsynchronouslyUpdatedChildrenNodes | public static void assertAsynchronouslyUpdatedChildrenNodes(Node node, int n) throws InterruptedException(Code) | | Fails with timeout if children are not updated to the required count.
|
copyFolder | protected File copyFolder(File d) throws IOException(Code) | | Make a temporary copy of a whole folder into some new dir in the scratch area.
Stolen from ant/freeform.
|
createJar | public static void createJar(File jar, Map contents, Manifest manifest) throws IOException(Code) | | Create a fresh JAR file.
Parameters: jar - the file to create Parameters: contents - keys are JAR entry paths, values are text contents (will be written in UTF-8) Parameters: manifest - a manifest to store (or null for none) |
file | protected static File file(File root, String path)(Code) | | Just calls File(root, path.replace('/', File.separatorChar));
|
generateStandaloneModule | public static NbModuleProject generateStandaloneModule(File workDir, String prjDir) throws IOException(Code) | | Returns
NbModuleProject created in the
TestBase.getWorkDir() /prjDir with code name base default to org.example +
dotted prjDir which is also used as the default package so
the layer and bundle are generated accordingly. Default module's display
name is set to Testing Module. So final set of generated files
for module1 as the parameter may look like:
- module1/manifest.mf
- module1/nbproject/platform.properties
- module1/nbproject/project.xml
- module1/src/org/example/module1/resources/Bundle.properties
- module1/src/org/example/module1/resources/layer.xml
Do not forget to first call
TestBase.initializeBuildProperties if you are not a TestBase subclass!
|
initializeBuildProperties | public static File initializeBuildProperties(File workDir, File dataDir) throws Exception(Code) | | Sets up global build.properties for the default platform.
For
PropertyUtils.userBuildProperties .
Called automatically by
TestBase.setUp .
Parameters: workDir - use getWorkDir() resulting properties file |
nbRoot | protected FileObject nbRoot()(Code) | | |
resolveEEP | protected FileObject resolveEEP(String relativePath)(Code) | | |
|
|