r2139 - in trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator: . field
Author: tchemit Date: 2010-12-30 08:37:19 +0100 (Thu, 30 Dec 2010) New Revision: 2139 Url: http://nuiton.org/repositories/revision/jaxx/2139 Log: fix tests java code (redundant this.,...) Modified: trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/AbstractBeanValidatorDetectorTest.java trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/BeanValidatorDetectorTest.java trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/BeanValidatorTest.java trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/SimpleBean.java trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/XWorkBeanValidatorTest.java trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/field/AbstractFieldValidatorTest.java trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/field/FieldExpressionBean.java Modified: trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/AbstractBeanValidatorDetectorTest.java =================================================================== --- trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/AbstractBeanValidatorDetectorTest.java 2010-12-29 19:45:21 UTC (rev 2138) +++ trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/AbstractBeanValidatorDetectorTest.java 2010-12-30 07:37:19 UTC (rev 2139) @@ -1,27 +1,3 @@ -/* - * #%L - * JAXX :: Runtime - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2008 - 2010 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * #L% - */ package jaxx.runtime.validator; import org.apache.commons.logging.Log; @@ -87,8 +63,8 @@ if (log.isInfoEnabled()) { log.info("sourceRoot " + sourceRoot); - log.info("validatorClass " + validatorClass); - log.info("classes " + Arrays.toString(classes)); + log.info("validatorClass " + validatorClass); + log.info("classes " + Arrays.toString(classes)); } } Modified: trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/BeanValidatorDetectorTest.java =================================================================== --- trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/BeanValidatorDetectorTest.java 2010-12-29 19:45:21 UTC (rev 2138) +++ trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/BeanValidatorDetectorTest.java 2010-12-30 07:37:19 UTC (rev 2139) @@ -1,27 +1,3 @@ -/* - * #%L - * JAXX :: Runtime - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2008 - 2010 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * #L% - */ package jaxx.runtime.validator; import org.junit.BeforeClass; @@ -36,6 +12,8 @@ /** @author tchemit <chemit@codelutin.com> */ public class BeanValidatorDetectorTest extends AbstractBeanValidatorDetectorTest { + private static final Class<?>[] TYPES = new Class<?>[]{Object.class}; + @BeforeClass public static void setUpClass() throws Exception { AbstractBeanValidatorDetectorTest.setUpClass(); @@ -50,7 +28,7 @@ @Test public void testDetectNothing() { - SortedSet<BeanValidator<?>> validators = instance.detect(sourceRoot, new Class<?>[]{Object.class}); + SortedSet<BeanValidator<?>> validators = instance.detect(sourceRoot, TYPES); assertEquals(0, validators.size()); } @@ -72,7 +50,7 @@ assertEquals(types[0], validator.getBeanClass()); assertNull(validator.getContextName()); - types = new Class<?>[]{Object.class}; + types = TYPES; result = instance.detect(sourceRoot, types); assertEquals(0, result.size()); @@ -102,7 +80,6 @@ /** Test of getContextsWithoutScopes method, of class BeanValidatorDetector. */ @Test public void testGetContextsWithoutScopes() { - System.out.println("getContextsWithoutScopes"); Class<?> clazz = SimpleBean.class; String[] expResult = {""}; Modified: trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/BeanValidatorTest.java =================================================================== --- trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/BeanValidatorTest.java 2010-12-29 19:45:21 UTC (rev 2138) +++ trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/BeanValidatorTest.java 2010-12-30 07:37:19 UTC (rev 2139) @@ -1,27 +1,3 @@ -/* - * #%L - * JAXX :: Runtime - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2008 - 2010 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * #L% - */ package jaxx.runtime.validator; import org.apache.commons.logging.Log; Modified: trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/SimpleBean.java =================================================================== --- trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/SimpleBean.java 2010-12-29 19:45:21 UTC (rev 2138) +++ trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/SimpleBean.java 2010-12-30 07:37:19 UTC (rev 2139) @@ -1,27 +1,3 @@ -/* - * #%L - * JAXX :: Runtime - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2008 - 2010 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * #L% - */ package jaxx.runtime.validator; import java.beans.PropertyChangeListener; Modified: trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/XWorkBeanValidatorTest.java =================================================================== --- trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/XWorkBeanValidatorTest.java 2010-12-29 19:45:21 UTC (rev 2138) +++ trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/XWorkBeanValidatorTest.java 2010-12-30 07:37:19 UTC (rev 2139) @@ -1,27 +1,3 @@ -/* - * #%L - * JAXX :: Runtime - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2008 - 2010 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * #L% - */ package jaxx.runtime.validator; import org.junit.After; Modified: trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/field/AbstractFieldValidatorTest.java =================================================================== --- trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/field/AbstractFieldValidatorTest.java 2010-12-29 19:45:21 UTC (rev 2138) +++ trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/field/AbstractFieldValidatorTest.java 2010-12-30 07:37:19 UTC (rev 2139) @@ -81,7 +81,7 @@ log.debug("start test " + getClass().getSimpleName()); bean = type.newInstance(); if (cacheValidator == null) { - validator = validator = new BeanValidator<B>(type, null); + validator = new BeanValidator<B>(type, null); cacheValidator = validator; } else { validator = (BeanValidator<B>) cacheValidator; Modified: trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/field/FieldExpressionBean.java =================================================================== --- trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/field/FieldExpressionBean.java 2010-12-29 19:45:21 UTC (rev 2138) +++ trunk/jaxx-runtime/src/test/java/jaxx/runtime/validator/field/FieldExpressionBean.java 2010-12-30 07:37:19 UTC (rev 2139) @@ -73,38 +73,38 @@ } public void setBooleanValue(boolean newValue) { - Object oldValue = this.booleanValue; - this.booleanValue = newValue; + Object oldValue = booleanValue; + booleanValue = newValue; firePropertyChange("booleanValue", oldValue, newValue); } public void setDoubleValue(double newValue) { - Object oldValue = this.doubleValue; - this.doubleValue = newValue; + Object oldValue = doubleValue; + doubleValue = newValue; firePropertyChange("doubleValue", oldValue, newValue); } public void setIntValue(int newValue) { - Object oldValue = this.stringValue; - this.intValue = newValue; + Object oldValue = stringValue; + intValue = newValue; firePropertyChange("intValue", oldValue, newValue); } public void setLongValue(long newValue) { - Object oldValue = this.longValue; - this.longValue = newValue; + Object oldValue = longValue; + longValue = newValue; firePropertyChange("longValue", oldValue, newValue); } public void setShortValue(short newValue) { - Object oldValue = this.shortValue; - this.shortValue = newValue; + Object oldValue = shortValue; + shortValue = newValue; firePropertyChange("shortValue", oldValue, newValue); } public void setStringValue(String newValue) { - Object oldValue = this.stringValue; - this.stringValue = newValue; + Object oldValue = stringValue; + stringValue = newValue; firePropertyChange("stringValue", oldValue, newValue); }
participants (1)
-
tchemit@users.nuiton.org