assertTrue( catalog.getCoverages().isEmpty() );
addCoverage();
assertEquals( 1, catalog.getCoverages().size() );
CoverageInfo cv2 = catalog.getFactory().createCoverage();
try {
catalog.add(cv2);
fail( "adding with no name should throw exception");
}
catch( Exception e ) {}
cv2.setName("cv2Name");
try {
catalog.add(cv2);
fail( "adding with no store should throw exception");
}
catch( Exception e ) {}
cv2.setStore( cs );
catalog.add( cv2 );
assertEquals( 2, catalog.getCoverages().size() );
CoverageInfo fromCatalog = catalog.getCoverageByName("cv2Name");
assertNotNull(fromCatalog);
//ensure the collection properties are set to NullObjects and not to null
assertNotNull(fromCatalog.getParameters());
CoverageInfo cv3 = catalog.getFactory().createCoverage();
cv3.setName( "cv3Name");
try {
catalog.getCoverages().add( cv3 );
fail( "adding directly should throw an exception");
}
catch( Exception e ) {}