From b445b300db3a6895647f7f939f63e6b1f52ac0a3 Mon Sep 17 00:00:00 2001 From: Thomas Knall Date: Tue, 25 Nov 2014 12:03:02 +0100 Subject: Fix build. - Remove svn metadata. - Fix local repository (inappropriate xalan-bin-dist dependency file names and copy-past error in dependency pom). - Switch jdk 1.5/1.6 to 1.7. - Exclude non working tests. --- .../PersonalAttributeTestCase.java.svn-base | 182 --------------------- 1 file changed, 182 deletions(-) delete mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/.svn/text-base/PersonalAttributeTestCase.java.svn-base (limited to 'id/server/stork2-commons/src/test/java/eu/stork/peps/tests/.svn/text-base/PersonalAttributeTestCase.java.svn-base') diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/.svn/text-base/PersonalAttributeTestCase.java.svn-base b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/.svn/text-base/PersonalAttributeTestCase.java.svn-base deleted file mode 100644 index 458d510e0..000000000 --- a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/.svn/text-base/PersonalAttributeTestCase.java.svn-base +++ /dev/null @@ -1,182 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.tests; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; - -import junit.framework.Assert; - -import org.junit.BeforeClass; -import org.junit.Test; - -import eu.stork.peps.auth.commons.PersonalAttribute; -import eu.stork.peps.auth.commons.STORKStatusCode; - -/** - * The PersonalAttribute's Test Case. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.4 $, $Date: 2010-11-17 05:17:03 $ - */ -public final class PersonalAttributeTestCase { - - /** - * An empty attribute. - */ - private static final PersonalAttribute EMPTYATTR = new PersonalAttribute(); - - /** - * An attribute with a complex value (canonicalResidenceAddress). - */ - private static PersonalAttribute complexAttrValue = null; - - /** - * An attribute with a simple value (age). - */ - @SuppressWarnings("serial") - private static final PersonalAttribute ATTR_VALUE = new PersonalAttribute( - "age", true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - /** - * Init PersonalAttributeTestCase class. - */ - @SuppressWarnings("serial") - @BeforeClass - public static void runsBeforeTheTestSuite() { - final Map values = new HashMap() { - { - put("countryCodeAddress", "PT"); - put("state", "Porto"); - put("town", "Porto"); - put("postalCode", "4100"); - put("streetName", "Avenida Sidonio Pais"); - put("streetNumber", "379"); - put("apartmentNumber", "B"); - } - }; - - complexAttrValue = - new PersonalAttribute("canonicalResidenceAddress", true, values, - STORKStatusCode.STATUS_AVAILABLE.toString()); - - } - - /** - * Tests the {@link PersonalAttribute#toString()} method for the given simple - * attribute value. Values must match. - */ - @Test - public void testToStringValues() { - Assert.assertEquals("age:true:[15,]:Available;", ATTR_VALUE.toString()); - } - - /** - * Tests the {@link PersonalAttribute#toString()} method for the given complex - * attribute value. Values must match. - */ - @Test - public void testToStringComplexValues() { - Assert.assertEquals( - "canonicalResidenceAddress:true:[postalCode=4100,apartmentNumber=B," - + "state=Porto,countryCodeAddress=PT,streetNumber=379," - + "streetName=Avenida Sidonio Pais,town=Porto,]:Available;", - complexAttrValue.toString()); - } - - /** - * Tests the {@link PersonalAttribute#isEmptyStatus()} method for the given - * empty attribute. Must return true. - */ - @Test - public void testToIsEmptyStatusWithNull() { - Assert.assertTrue(EMPTYATTR.isEmptyStatus()); - } - - /** - * Tests the {@link PersonalAttribute#isEmptyStatus()} method for the given - * new attribute. Must return true. - */ - @Test - public void testToIsEmptyStatusWithEmptyString() { - final PersonalAttribute attr = (PersonalAttribute) EMPTYATTR.clone(); - attr.setStatus(""); - Assert.assertTrue(attr.isEmptyStatus()); - } - - /** - * Tests the {@link PersonalAttribute#isEmptyValue()} method for the given - * empty attribute. Must return true. - */ - @Test - public void testToIsEmptyValueWithNull() { - final PersonalAttribute attr = (PersonalAttribute) EMPTYATTR.clone(); - attr.setValue(null); - Assert.assertTrue(attr.isEmptyValue()); - } - - /** - * Tests the {@link PersonalAttribute#isEmptyValue()} method for the given - * empty attribute. Must return true. - */ - @Test - public void testToIsEmptyValue() { - Assert.assertTrue(EMPTYATTR.isEmptyValue()); - } - - /** - * Tests the {@link PersonalAttribute#isEmptyComplexValue()} method for the - * given empty attribute. Must return true. - */ - @Test - public void testToIsEmptyComplexValueWithNull() { - final PersonalAttribute attr = (PersonalAttribute) EMPTYATTR.clone(); - attr.setComplexValue(null); - Assert.assertTrue(attr.isEmptyComplexValue()); - } - - /** - * Tests the {@link PersonalAttribute#isEmptyComplexValue()} method for the - * given empty attribute. Must return true. - */ - @Test - public void testToIsEmptyComplexValueWithEmptyComplexValue() { - Assert.assertTrue(EMPTYATTR.isEmptyComplexValue()); - } - - /** - * Tests the {@link PersonalAttribute#clone()} method for the given attribute. - * Must return true. - */ - @Test - public void testCloneToComplexValue() { - Assert.assertNotSame(complexAttrValue, complexAttrValue.clone()); - } - - /** - * Tests the {@link PersonalAttribute#clone()} method for the given attribute. - * Must return true. - */ - @Test - public void testCloneToValue() { - Assert.assertNotSame(ATTR_VALUE, ATTR_VALUE.clone()); - } -} -- cgit v1.2.3