This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 47326 - Need unit tests for j2seproject build-impl.xml functionality
Summary: Need unit tests for j2seproject build-impl.xml functionality
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks: 41537
  Show dependency tree
 
Reported: 2004-08-17 16:46 UTC by Jesse Glick
Modified: 2004-09-21 10:53 UTC (History)
1 user (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2004-08-17 16:46:22 UTC
I guess they should call J2SEProjectGenerator with
some parameters, set up a couple of source files,
and then invoke Ant targets. (ActionUtils may be
handy there.)

You can check just the effect of the build - exit
status and any changes on disk - where build
messages will be printed to stdout/err. Or you can
supply a special IOProvider (see
IOProvider.Trivial for ideas) which collects
messages and checks them.

In either case, need a simple InstalledFileLocator
to point to nbbuild/netbeans/ide4/ant/ for the
query "ant" or any query starting with "ant/".

There are existing examples of many of these
techniques in other unit tests; see for example
JavaAntLoggerTest.
Comment 1 David Konecny 2004-09-21 10:53:38 UTC
Two tests added:
* J2SEProjectGeneratorTest - checks that all files and properties are
correctly created
* BuildImplTest (excluded from commit-validation) - checks that basic
target produce expected results based on the properties passed from IDE.

Fixed in:
nbproject/project.properties;
new revision: 1.9; previous revision: 1.8
test/cfg-unit.xml;
new revision: 1.2; previous revision: 1.1
test/unit/src/org/netbeans/modules/java/j2seproject/BuildImplTest.java;
initial revision: 1.1
test/unit/src/org/netbeans/modules/java/j2seproject/J2SEProjectGeneratorTest.java;
initial revision: 1.1