From: <rit...@us...> - 2010-06-22 23:14:29
|
Revision: 20 http://netcdftools.svn.sourceforge.net/netcdftools/?rev=20&view=rev Author: ritacsiro Date: 2010-06-22 23:14:22 +0000 (Tue, 22 Jun 2010) Log Message: ----------- ANDSWRON-678 - Add variable parameter to defineAttributes. Modified Paths: -------------- trunk/src/test/java/au/csiro/netcdf/TestNcDefineAttributes.java Modified: trunk/src/test/java/au/csiro/netcdf/TestNcDefineAttributes.java =================================================================== --- trunk/src/test/java/au/csiro/netcdf/TestNcDefineAttributes.java 2010-06-22 07:16:36 UTC (rev 19) +++ trunk/src/test/java/au/csiro/netcdf/TestNcDefineAttributes.java 2010-06-22 23:14:22 UTC (rev 20) @@ -56,7 +56,7 @@ /** * The name of the command line option used for specifying the global attributes of a netCDF file. */ - private static final String GLOBAL_ATTRIBUTES = "globalAttributes"; + private static final String ATTRIBUTES = "attributes"; /** * The name of the netCDF file to write to. @@ -167,8 +167,8 @@ assertTrue("The following option is not recognised by the command: " + OUTPUT_FILE, options.hasOption(OUTPUT_FILE)); - assertTrue("The following option is not recognised by the command: " + GLOBAL_ATTRIBUTES, - options.hasOption(GLOBAL_ATTRIBUTES)); + assertTrue("The following option is not recognised by the command: " + ATTRIBUTES, + options.hasOption(ATTRIBUTES)); } @@ -212,7 +212,7 @@ { String[] args = new String[] { ncDefineAttr.getCommandName(), "-" + OUTPUT_FILE, NC_FILE_NAME, - "-" + GLOBAL_ATTRIBUTES, ATTR1_NAME+"="+ATTR1_DATA }; + "-" + ATTRIBUTES, ATTR1_NAME+"="+ATTR1_DATA }; try { @@ -265,7 +265,7 @@ { String[] args = new String[] { ncDefineAttr.getCommandName(), "-" + OUTPUT_FILE, NC_FILE_NAME, - "-" + GLOBAL_ATTRIBUTES, ATTR1_NAME + "=" + ATTR1_DATA + "," + ATTR2_NAME + "=" + ATTR2_DATA }; + "-" + ATTRIBUTES, ATTR1_NAME + "=" + ATTR1_DATA + "," + ATTR2_NAME + "=" + ATTR2_DATA }; try { @@ -306,7 +306,7 @@ public final void testMissingRequiredOption() { String[] args = new String[] { ncDefineAttr.getCommandName(), - "-" + GLOBAL_ATTRIBUTES, ATTR1_NAME+"="+ATTR1_DATA }; + "-" + ATTRIBUTES, ATTR1_NAME+"="+ATTR1_DATA }; String errors = ncDefineAttr.validCommand(args); assertTrue("Command without output file option should return an error", !errors.isEmpty()); @@ -320,12 +320,12 @@ { String[] args = new String[] { ncDefineAttr.getCommandName(), "-" + OUTPUT_FILE, NC_FILE_NAME, - "-" + GLOBAL_ATTRIBUTES, ATTR1_NAME}; + "-" + ATTRIBUTES, ATTR1_NAME}; String errors = ncDefineAttr.validCommand(args); assertTrue("Command with invalid attribute string should return an error", !errors.isEmpty()); assertEquals("Error string was not correct", - "\nglobalAttributes value is not a comma separated String of attribute-value pairs: Attr1", errors); + "\nattributes value is not a comma separated String of attribute-value pairs: Attr1", errors); } /** @@ -337,7 +337,7 @@ "-" + OUTPUT_FILE, NC_FILE_NAME}; String errors = ncDefineAttr.validCommand(args); - assertEquals("Command with missing " + GLOBAL_ATTRIBUTES + " attribute should not return an error", "", errors); + assertEquals("Command with missing " + ATTRIBUTES + " attribute should not return an error", "", errors); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |