150151152153154155156157158159160
assertNotNull(feature); try{ feature = SimpleFeatureBuilder.build( featureType, new Object[]{"Longer Than 5"}, "ID" ); feature.validate(); fail("this should fail because the value is longer than 5 characters"); }catch (Exception e) { // good } }
174175176177178179180181182183184
assertNotNull(feature); try { SimpleFeature sf = SimpleFeatureBuilder.build( featureType, new Object[]{"NotValue"}, "ID" ); sf.validate(); fail( "PropertyIsEqualTo filter should have failed"); } catch( Exception e ) { //good }