incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1358111 [12/13] - in /incubator/isis/trunk/framework/core/commons: ./ src/main/java/org/apache/isis/core/commons/authentication/ src/main/java/org/apache/isis/core/commons/components/ src/main/java/org/apache/isis/core/commons/config/ src/...
Date Fri, 06 Jul 2012 10:51:21 GMT
Modified: incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/ensure/Ensure_GivenValueThatDoesNotMatchTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/ensure/Ensure_GivenValueThatDoesNotMatchTest.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/ensure/Ensure_GivenValueThatDoesNotMatchTest.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/ensure/Ensure_GivenValueThatDoesNotMatchTest.java Fri Jul  6 10:51:16 2012
@@ -1,91 +1,91 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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 org.apache.isis.core.commons.ensure;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
-
-import org.junit.Test;
-
-public class Ensure_GivenValueThatDoesNotMatchTest {
-
-    @Test
-    public void whenCallEnsureThatArgShouldThrowIllegalArgumentException() {
-        try {
-            Ensure.ensureThatArg("foo", is(nullValue()));
-            fail();
-        } catch (final IllegalArgumentException ex) {
-            assertThat(ex.getMessage(), is("illegal argument, expected: is null"));
-        }
-    }
-
-    @Test
-    public void whenCallEnsureThatArgOverloadedShouldThrowIllegalArgumentExceptionUsingSuppliedMessage() {
-        try {
-            Ensure.ensureThatArg("foo", is(nullValue()), "my message");
-            fail();
-        } catch (final IllegalArgumentException ex) {
-            assertThat(ex.getMessage(), is("my message"));
-        }
-    }
-
-    @Test
-    public void whenCallEnsureThatStateShouldThrowIllegalStateException() {
-        try {
-            Ensure.ensureThatState("foo", is(nullValue()));
-            fail();
-        } catch (final IllegalStateException ex) {
-            assertThat(ex.getMessage(), is("illegal argument, expected: is null"));
-        }
-    }
-
-    @Test
-    public void whenCallEnsureThatStateOverloadedShouldThrowIllegalStateExceptionUsingSuppliedMessage() {
-        try {
-            Ensure.ensureThatState("foo", is(nullValue()), "my message");
-            fail();
-        } catch (final IllegalStateException ex) {
-            assertThat(ex.getMessage(), is("my message"));
-        }
-    }
-
-    @Test
-    public void whenCallEnsureThatContextShouldThrowIllegalThreadStateException() {
-        try {
-            Ensure.ensureThatContext("foo", is(nullValue()));
-            fail();
-        } catch (final IllegalThreadStateException ex) {
-            assertThat(ex.getMessage(), is("illegal argument, expected: is null"));
-        }
-    }
-
-    @Test
-    public void whenCallEnsureThatContextOverloadedShouldThrowIllegalThreadStateExceptionUsingSuppliedMessage() {
-        try {
-            Ensure.ensureThatContext("foo", is(nullValue()), "my message");
-            fail();
-        } catch (final IllegalThreadStateException ex) {
-            assertThat(ex.getMessage(), is("my message"));
-        }
-    }
-
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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 org.apache.isis.core.commons.ensure;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+import org.junit.Test;
+
+public class Ensure_GivenValueThatDoesNotMatchTest {
+
+    @Test
+    public void whenCallEnsureThatArgShouldThrowIllegalArgumentException() {
+        try {
+            Ensure.ensureThatArg("foo", is(nullValue()));
+            fail();
+        } catch (final IllegalArgumentException ex) {
+            assertThat(ex.getMessage(), is("illegal argument, expected: is null"));
+        }
+    }
+
+    @Test
+    public void whenCallEnsureThatArgOverloadedShouldThrowIllegalArgumentExceptionUsingSuppliedMessage() {
+        try {
+            Ensure.ensureThatArg("foo", is(nullValue()), "my message");
+            fail();
+        } catch (final IllegalArgumentException ex) {
+            assertThat(ex.getMessage(), is("my message"));
+        }
+    }
+
+    @Test
+    public void whenCallEnsureThatStateShouldThrowIllegalStateException() {
+        try {
+            Ensure.ensureThatState("foo", is(nullValue()));
+            fail();
+        } catch (final IllegalStateException ex) {
+            assertThat(ex.getMessage(), is("illegal argument, expected: is null"));
+        }
+    }
+
+    @Test
+    public void whenCallEnsureThatStateOverloadedShouldThrowIllegalStateExceptionUsingSuppliedMessage() {
+        try {
+            Ensure.ensureThatState("foo", is(nullValue()), "my message");
+            fail();
+        } catch (final IllegalStateException ex) {
+            assertThat(ex.getMessage(), is("my message"));
+        }
+    }
+
+    @Test
+    public void whenCallEnsureThatContextShouldThrowIllegalThreadStateException() {
+        try {
+            Ensure.ensureThatContext("foo", is(nullValue()));
+            fail();
+        } catch (final IllegalThreadStateException ex) {
+            assertThat(ex.getMessage(), is("illegal argument, expected: is null"));
+        }
+    }
+
+    @Test
+    public void whenCallEnsureThatContextOverloadedShouldThrowIllegalThreadStateExceptionUsingSuppliedMessage() {
+        try {
+            Ensure.ensureThatContext("foo", is(nullValue()), "my message");
+            fail();
+        } catch (final IllegalThreadStateException ex) {
+            assertThat(ex.getMessage(), is("my message"));
+        }
+    }
+
+}

Modified: incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/IoUtils_CopyTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/IoUtils_CopyTest.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/IoUtils_CopyTest.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/IoUtils_CopyTest.java Fri Jul  6 10:51:16 2012
@@ -1,136 +1,136 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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 org.apache.isis.core.commons.lang;
-
-import static org.junit.Assert.assertThat;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-
-import org.hamcrest.Description;
-import org.hamcrest.Matcher;
-import org.hamcrest.TypeSafeMatcher;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class IoUtils_CopyTest {
-
-    private static final class ArrayMatcher extends TypeSafeMatcher<byte[]> {
-
-        private final byte[] expectedBytes;
-
-        public ArrayMatcher(final byte[] expectedBytes) {
-            this.expectedBytes = expectedBytes;
-        }
-
-        @Override
-        public boolean matchesSafely(final byte[] actualBytes) {
-            if (actualBytes.length != expectedBytes.length) {
-                return false;
-            }
-            for (int i = 0; i < actualBytes.length; i++) {
-                if (actualBytes[i] != expectedBytes[i]) {
-                    return false;
-                }
-            }
-            return true;
-        }
-
-        @Override
-        public void describeTo(final Description arg0) {
-            arg0.appendText("does not match expected array");
-        }
-    }
-
-    private static int BUF_INTERNAL_SIZE = 1024;
-
-    @Before
-    public void setUp() throws Exception {
-    }
-
-    @After
-    public void tearDown() throws Exception {
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void handlesNullInputStream() throws Exception {
-        final ByteArrayInputStream bais = null;
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        IoUtils.copy(bais, baos);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void handlesNullOutputStream() throws Exception {
-        final byte[] bytes = createByteArray(10);
-        final ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
-        final ByteArrayOutputStream baos = null;
-        IoUtils.copy(bais, baos);
-    }
-
-    @Test
-    public void copiesEmptyInputStream() throws Exception {
-        final byte[] bytes = createByteArray(0);
-        final ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        IoUtils.copy(bais, baos);
-        assertThat(baos.toByteArray(), arrayEqualTo(bytes));
-    }
-
-    @Test
-    public void copiesInputStreamSmallerThanInternalBuffer() throws Exception {
-        final byte[] bytes = createByteArray(BUF_INTERNAL_SIZE - 1);
-        final ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        IoUtils.copy(bais, baos);
-        assertThat(baos.toByteArray(), arrayEqualTo(bytes));
-    }
-
-    @Test
-    public void copiesInputStreamLargerThanInternalBuffer() throws Exception {
-        final byte[] bytes = createByteArray(BUF_INTERNAL_SIZE + 1);
-        final ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        IoUtils.copy(bais, baos);
-        assertThat(baos.toByteArray(), arrayEqualTo(bytes));
-    }
-
-    @Test
-    public void copiesInputStreamExactlySameSizeAsInternalBuffer() throws Exception {
-        final byte[] bytes = createByteArray(BUF_INTERNAL_SIZE);
-        final ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        IoUtils.copy(bais, baos);
-        assertThat(baos.toByteArray(), arrayEqualTo(bytes));
-    }
-
-    private Matcher<byte[]> arrayEqualTo(final byte[] bytes) {
-        return new ArrayMatcher(bytes);
-    }
-
-    private byte[] createByteArray(final int size) {
-        final byte[] bytes = new byte[size];
-        for (int i = 0; i < size; i++) {
-            bytes[i] = (byte) i;
-        }
-        return bytes;
-    }
-
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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 org.apache.isis.core.commons.lang;
+
+import static org.junit.Assert.assertThat;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+
+import org.hamcrest.Description;
+import org.hamcrest.Matcher;
+import org.hamcrest.TypeSafeMatcher;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class IoUtils_CopyTest {
+
+    private static final class ArrayMatcher extends TypeSafeMatcher<byte[]> {
+
+        private final byte[] expectedBytes;
+
+        public ArrayMatcher(final byte[] expectedBytes) {
+            this.expectedBytes = expectedBytes;
+        }
+
+        @Override
+        public boolean matchesSafely(final byte[] actualBytes) {
+            if (actualBytes.length != expectedBytes.length) {
+                return false;
+            }
+            for (int i = 0; i < actualBytes.length; i++) {
+                if (actualBytes[i] != expectedBytes[i]) {
+                    return false;
+                }
+            }
+            return true;
+        }
+
+        @Override
+        public void describeTo(final Description arg0) {
+            arg0.appendText("does not match expected array");
+        }
+    }
+
+    private static int BUF_INTERNAL_SIZE = 1024;
+
+    @Before
+    public void setUp() throws Exception {
+    }
+
+    @After
+    public void tearDown() throws Exception {
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void handlesNullInputStream() throws Exception {
+        final ByteArrayInputStream bais = null;
+        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        IoUtils.copy(bais, baos);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void handlesNullOutputStream() throws Exception {
+        final byte[] bytes = createByteArray(10);
+        final ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+        final ByteArrayOutputStream baos = null;
+        IoUtils.copy(bais, baos);
+    }
+
+    @Test
+    public void copiesEmptyInputStream() throws Exception {
+        final byte[] bytes = createByteArray(0);
+        final ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        IoUtils.copy(bais, baos);
+        assertThat(baos.toByteArray(), arrayEqualTo(bytes));
+    }
+
+    @Test
+    public void copiesInputStreamSmallerThanInternalBuffer() throws Exception {
+        final byte[] bytes = createByteArray(BUF_INTERNAL_SIZE - 1);
+        final ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        IoUtils.copy(bais, baos);
+        assertThat(baos.toByteArray(), arrayEqualTo(bytes));
+    }
+
+    @Test
+    public void copiesInputStreamLargerThanInternalBuffer() throws Exception {
+        final byte[] bytes = createByteArray(BUF_INTERNAL_SIZE + 1);
+        final ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        IoUtils.copy(bais, baos);
+        assertThat(baos.toByteArray(), arrayEqualTo(bytes));
+    }
+
+    @Test
+    public void copiesInputStreamExactlySameSizeAsInternalBuffer() throws Exception {
+        final byte[] bytes = createByteArray(BUF_INTERNAL_SIZE);
+        final ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        IoUtils.copy(bais, baos);
+        assertThat(baos.toByteArray(), arrayEqualTo(bytes));
+    }
+
+    private Matcher<byte[]> arrayEqualTo(final byte[] bytes) {
+        return new ArrayMatcher(bytes);
+    }
+
+    private byte[] createByteArray(final int size) {
+        final byte[] bytes = new byte[size];
+        for (int i = 0; i < size; i++) {
+            bytes[i] = (byte) i;
+        }
+        return bytes;
+    }
+
+}

Modified: incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/JavaClassUtilsTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/JavaClassUtilsTest.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/JavaClassUtilsTest.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/JavaClassUtilsTest.java Fri Jul  6 10:51:16 2012
@@ -1,59 +1,59 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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 org.apache.isis.core.commons.lang;
-
-import static org.junit.Assert.assertEquals;
-
-import org.jmock.Mockery;
-import org.jmock.integration.junit4.JMock;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-@RunWith(JMock.class)
-public class JavaClassUtilsTest {
-
-    @SuppressWarnings("unused")
-    private final Mockery context = new JUnit4Mockery();
-
-    @Before
-    public void setUp() throws Exception {
-    }
-
-    @After
-    public void tearDown() throws Exception {
-    }
-
-    @Test
-    public void voidBuiltIns() throws ClassNotFoundException {
-        assertEquals(JavaClassUtils.getBuiltIn("void"), void.class);
-        assertEquals(JavaClassUtils.getBuiltIn("boolean"), boolean.class);
-        assertEquals(JavaClassUtils.getBuiltIn("byte"), byte.class);
-        assertEquals(JavaClassUtils.getBuiltIn("short"), short.class);
-        assertEquals(JavaClassUtils.getBuiltIn("int"), int.class);
-        assertEquals(JavaClassUtils.getBuiltIn("long"), long.class);
-        assertEquals(JavaClassUtils.getBuiltIn("char"), char.class);
-        assertEquals(JavaClassUtils.getBuiltIn("float"), float.class);
-        assertEquals(JavaClassUtils.getBuiltIn("double"), double.class);
-    }
-
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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 org.apache.isis.core.commons.lang;
+
+import static org.junit.Assert.assertEquals;
+
+import org.jmock.Mockery;
+import org.jmock.integration.junit4.JMock;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(JMock.class)
+public class JavaClassUtilsTest {
+
+    @SuppressWarnings("unused")
+    private final Mockery context = new JUnit4Mockery();
+
+    @Before
+    public void setUp() throws Exception {
+    }
+
+    @After
+    public void tearDown() throws Exception {
+    }
+
+    @Test
+    public void voidBuiltIns() throws ClassNotFoundException {
+        assertEquals(JavaClassUtils.getBuiltIn("void"), void.class);
+        assertEquals(JavaClassUtils.getBuiltIn("boolean"), boolean.class);
+        assertEquals(JavaClassUtils.getBuiltIn("byte"), byte.class);
+        assertEquals(JavaClassUtils.getBuiltIn("short"), short.class);
+        assertEquals(JavaClassUtils.getBuiltIn("int"), int.class);
+        assertEquals(JavaClassUtils.getBuiltIn("long"), long.class);
+        assertEquals(JavaClassUtils.getBuiltIn("char"), char.class);
+        assertEquals(JavaClassUtils.getBuiltIn("float"), float.class);
+        assertEquals(JavaClassUtils.getBuiltIn("double"), double.class);
+    }
+
+}

Modified: incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/LocaleUtilsTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/LocaleUtilsTest.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/LocaleUtilsTest.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/LocaleUtilsTest.java Fri Jul  6 10:51:16 2012
@@ -1,36 +1,36 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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 org.apache.isis.core.commons.lang;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Test;
-
-public class LocaleUtilsTest {
-
-    @Test
-    public void canFindEnGB() throws Exception {
-        assertThat(LocaleUtils.findLocale("en_GB"), is(not(nullValue())));
-
-    }
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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 org.apache.isis.core.commons.lang;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Test;
+
+public class LocaleUtilsTest {
+
+    @Test
+    public void canFindEnGB() throws Exception {
+        assertThat(LocaleUtils.findLocale("en_GB"), is(not(nullValue())));
+
+    }
+}

Modified: incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/NameUtilTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/NameUtilTest.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/NameUtilTest.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/NameUtilTest.java Fri Jul  6 10:51:16 2012
@@ -1,82 +1,82 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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 org.apache.isis.core.commons.lang;
-
-import junit.framework.TestCase;
-
-public class NameUtilTest extends TestCase {
-
-    public void testNaturalNameAddsSpacesToCamelCaseWords() {
-        assertEquals("Camel Case Word", NameUtils.naturalName("CamelCaseWord"));
-    }
-
-    public void testNaturalNameAddsSpacesBeforeNumbers() {
-        assertEquals("One 2 One", NameUtils.naturalName("One2One"));
-        assertEquals("Type 123", NameUtils.naturalName("Type123"));
-        assertEquals("4321 Go", NameUtils.naturalName("4321Go"));
-    }
-
-    public void testNaturalNameRecognisesAcronymns() {
-        assertEquals("TNT Power", NameUtils.naturalName("TNTPower"));
-        assertEquals("Spam RAM Can", NameUtils.naturalName("SpamRAMCan"));
-        assertEquals("DOB", NameUtils.naturalName("DOB"));
-    }
-
-    public void testNaturalNameWithShortNames() {
-        assertEquals("At", NameUtils.naturalName("At"));
-        assertEquals("I", NameUtils.naturalName("I"));
-    }
-
-    public void testNaturalNameNoChange() {
-        assertEquals("Camel Case Word", NameUtils.naturalName("CamelCaseWord"));
-        assertEquals("Almost Normal english sentence", NameUtils.naturalName("Almost Normal english sentence"));
-    }
-
-    public void testPluralNameAdd_S() {
-        assertEquals("Cans", NameUtils.pluralName("Can"));
-        assertEquals("Spaces", NameUtils.pluralName("Space"));
-        assertEquals("Noses", NameUtils.pluralName("Nose"));
-    }
-
-    public void testPluralNameReplace_Y_With_IES() {
-        assertEquals("Babies", NameUtils.pluralName("Baby"));
-        assertEquals("Cities", NameUtils.pluralName("City"));
-    }
-
-    public void testPluralNameReplaceAdd_ES() {
-        assertEquals("Foxes", NameUtils.pluralName("Fox"));
-        assertEquals("Bosses", NameUtils.pluralName("Boss"));
-    }
-
-    public void testSimpleNameAllToLowerCase() {
-        assertEquals("abcde", NameUtils.simpleName("ABCDE"));
-        assertEquals("camelcaseword", NameUtils.simpleName("CamelCaseWord"));
-    }
-
-    public void testSimpleNameNoChanges() {
-        assertEquals("nochanges", NameUtils.simpleName("nochanges"));
-    }
-
-    public void testSimpleNameRemoveSpaces() {
-        assertEquals("abcde", NameUtils.simpleName("a bc  de "));
-        assertEquals("twoparts", NameUtils.simpleName("two parts"));
-    }
-
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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 org.apache.isis.core.commons.lang;
+
+import junit.framework.TestCase;
+
+public class NameUtilTest extends TestCase {
+
+    public void testNaturalNameAddsSpacesToCamelCaseWords() {
+        assertEquals("Camel Case Word", NameUtils.naturalName("CamelCaseWord"));
+    }
+
+    public void testNaturalNameAddsSpacesBeforeNumbers() {
+        assertEquals("One 2 One", NameUtils.naturalName("One2One"));
+        assertEquals("Type 123", NameUtils.naturalName("Type123"));
+        assertEquals("4321 Go", NameUtils.naturalName("4321Go"));
+    }
+
+    public void testNaturalNameRecognisesAcronymns() {
+        assertEquals("TNT Power", NameUtils.naturalName("TNTPower"));
+        assertEquals("Spam RAM Can", NameUtils.naturalName("SpamRAMCan"));
+        assertEquals("DOB", NameUtils.naturalName("DOB"));
+    }
+
+    public void testNaturalNameWithShortNames() {
+        assertEquals("At", NameUtils.naturalName("At"));
+        assertEquals("I", NameUtils.naturalName("I"));
+    }
+
+    public void testNaturalNameNoChange() {
+        assertEquals("Camel Case Word", NameUtils.naturalName("CamelCaseWord"));
+        assertEquals("Almost Normal english sentence", NameUtils.naturalName("Almost Normal english sentence"));
+    }
+
+    public void testPluralNameAdd_S() {
+        assertEquals("Cans", NameUtils.pluralName("Can"));
+        assertEquals("Spaces", NameUtils.pluralName("Space"));
+        assertEquals("Noses", NameUtils.pluralName("Nose"));
+    }
+
+    public void testPluralNameReplace_Y_With_IES() {
+        assertEquals("Babies", NameUtils.pluralName("Baby"));
+        assertEquals("Cities", NameUtils.pluralName("City"));
+    }
+
+    public void testPluralNameReplaceAdd_ES() {
+        assertEquals("Foxes", NameUtils.pluralName("Fox"));
+        assertEquals("Bosses", NameUtils.pluralName("Boss"));
+    }
+
+    public void testSimpleNameAllToLowerCase() {
+        assertEquals("abcde", NameUtils.simpleName("ABCDE"));
+        assertEquals("camelcaseword", NameUtils.simpleName("CamelCaseWord"));
+    }
+
+    public void testSimpleNameNoChanges() {
+        assertEquals("nochanges", NameUtils.simpleName("nochanges"));
+    }
+
+    public void testSimpleNameRemoveSpaces() {
+        assertEquals("abcde", NameUtils.simpleName("a bc  de "));
+        assertEquals("twoparts", NameUtils.simpleName("two parts"));
+    }
+
+}

Modified: incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/PrintLocale.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/PrintLocale.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/PrintLocale.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/PrintLocale.java Fri Jul  6 10:51:16 2012
@@ -1,59 +1,59 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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 org.apache.isis.core.commons.lang;
-
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.TimeZone;
-
-public class PrintLocale {
-    public static void main(final String[] args) {
-        if (args.length >= 2) {
-            final String localeSetting = args[0];
-            System.out.println("Setting Locale to " + localeSetting + "\n");
-            Locale.setDefault(new Locale(localeSetting));
-
-            final String timezoneSetting = args[1];
-            System.out.println("Setting TimeZone to " + timezoneSetting + "\n");
-            TimeZone.setDefault(TimeZone.getTimeZone(timezoneSetting));
-        }
-
-        final Locale locale = Locale.getDefault();
-        System.out.println("Locale");
-        System.out.println("Code: " + locale.toString());
-        try {
-            System.out.println("Country: " + locale.getISO3Country());
-        } catch (final MissingResourceException e) {
-            System.out.println("Country: " + e.getMessage());
-        }
-        try {
-            System.out.println("Language: " + locale.getISO3Language());
-        } catch (final MissingResourceException e) {
-            System.out.println("Language: " + e.getMessage());
-        }
-
-        System.out.println("\nTimezone");
-        final TimeZone timezone = TimeZone.getDefault();
-        System.out.println("Code: " + timezone.getID());
-        System.out.println("Name: " + timezone.getDisplayName());
-        System.out.println("Offset: " + timezone.getRawOffset() / (1000 * 60 * 60));
-        System.out.println("DST: " + timezone.getDSTSavings() / (1000 * 60 * 60));
-    }
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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 org.apache.isis.core.commons.lang;
+
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.TimeZone;
+
+public class PrintLocale {
+    public static void main(final String[] args) {
+        if (args.length >= 2) {
+            final String localeSetting = args[0];
+            System.out.println("Setting Locale to " + localeSetting + "\n");
+            Locale.setDefault(new Locale(localeSetting));
+
+            final String timezoneSetting = args[1];
+            System.out.println("Setting TimeZone to " + timezoneSetting + "\n");
+            TimeZone.setDefault(TimeZone.getTimeZone(timezoneSetting));
+        }
+
+        final Locale locale = Locale.getDefault();
+        System.out.println("Locale");
+        System.out.println("Code: " + locale.toString());
+        try {
+            System.out.println("Country: " + locale.getISO3Country());
+        } catch (final MissingResourceException e) {
+            System.out.println("Country: " + e.getMessage());
+        }
+        try {
+            System.out.println("Language: " + locale.getISO3Language());
+        } catch (final MissingResourceException e) {
+            System.out.println("Language: " + e.getMessage());
+        }
+
+        System.out.println("\nTimezone");
+        final TimeZone timezone = TimeZone.getDefault();
+        System.out.println("Code: " + timezone.getID());
+        System.out.println("Name: " + timezone.getDisplayName());
+        System.out.println("Offset: " + timezone.getRawOffset() / (1000 * 60 * 60));
+        System.out.println("DST: " + timezone.getDSTSavings() / (1000 * 60 * 60));
+    }
+}

Copied: incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtilsTest_enumTitle.java (from r1357908, incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/LocaleUtilsTest.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtilsTest_enumTitle.java?p2=incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtilsTest_enumTitle.java&p1=incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/LocaleUtilsTest.java&r1=1357908&r2=1358111&rev=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/LocaleUtilsTest.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtilsTest_enumTitle.java Fri Jul  6 10:51:16 2012
@@ -1,36 +1,41 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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 org.apache.isis.core.commons.lang;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Test;
-
-public class LocaleUtilsTest {
-
-    @Test
-    public void canFindEnGB() throws Exception {
-        assertThat(LocaleUtils.findLocale("en_GB"), is(not(nullValue())));
-
-    }
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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 org.apache.isis.core.commons.lang;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Test;
+
+public class StringUtilsTest_enumTitle {
+
+    @Test
+    public void enumTitle() {
+        assertThat(StringUtils.enumTitle("FOO"), is("Foo"));
+        assertThat(StringUtils.enumTitle("FOO_BAR"), is("Foo Bar"));
+    }
+
+    @Test
+    public void enumDeTitle() {
+        assertThat(StringUtils.enumDeTitle("Foo"), is("FOO"));
+        assertThat(StringUtils.enumDeTitle("Foo Bar"), is("FOO_BAR"));
+    }
+
+}

Modified: incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_NaturalNameTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_NaturalNameTest.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_NaturalNameTest.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_NaturalNameTest.java Fri Jul  6 10:51:16 2012
@@ -1,59 +1,59 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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 org.apache.isis.core.commons.lang;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Test;
-
-public class StringUtils_NaturalNameTest {
-
-    @Test
-    public void shouldCreateANaturalNameForABooleanPropertyAccessorName() {
-        assertThat(StringUtils.naturalName("isOutOfStock"), is("Out Of Stock"));
-    }
-
-    @Test
-    public void shouldCreateANaturalNameForABooleanPropertyAccessorNameSingleWord() {
-        assertThat(StringUtils.naturalName("isBlacklisted"), is("Blacklisted"));
-    }
-
-    @Test
-    public void shouldCreateANaturalNameForANonBooleanPropertyAccessorName() {
-        assertThat(StringUtils.naturalName("getFirstName"), is("First Name"));
-    }
-
-    @Test
-    public void shouldCreateANaturalNameForANonBooleanPropertyAccessorNameSingleWord() {
-        assertThat(StringUtils.naturalName("getAge"), is("Age"));
-    }
-
-    @Test
-    public void shouldCreateANaturalNameForAPropertyMutatorName() {
-        assertThat(StringUtils.naturalName("setFirstName"), is("First Name"));
-    }
-
-    @Test
-    public void shouldCreateANaturalNameForAPropertyMutatorNameSingleWord() {
-        assertThat(StringUtils.naturalName("setAge"), is("Age"));
-    }
-
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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 org.apache.isis.core.commons.lang;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Test;
+
+public class StringUtils_NaturalNameTest {
+
+    @Test
+    public void shouldCreateANaturalNameForABooleanPropertyAccessorName() {
+        assertThat(StringUtils.naturalName("isOutOfStock"), is("Out Of Stock"));
+    }
+
+    @Test
+    public void shouldCreateANaturalNameForABooleanPropertyAccessorNameSingleWord() {
+        assertThat(StringUtils.naturalName("isBlacklisted"), is("Blacklisted"));
+    }
+
+    @Test
+    public void shouldCreateANaturalNameForANonBooleanPropertyAccessorName() {
+        assertThat(StringUtils.naturalName("getFirstName"), is("First Name"));
+    }
+
+    @Test
+    public void shouldCreateANaturalNameForANonBooleanPropertyAccessorNameSingleWord() {
+        assertThat(StringUtils.naturalName("getAge"), is("Age"));
+    }
+
+    @Test
+    public void shouldCreateANaturalNameForAPropertyMutatorName() {
+        assertThat(StringUtils.naturalName("setFirstName"), is("First Name"));
+    }
+
+    @Test
+    public void shouldCreateANaturalNameForAPropertyMutatorNameSingleWord() {
+        assertThat(StringUtils.naturalName("setAge"), is("Age"));
+    }
+
+}

Modified: incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_NaturalizeTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_NaturalizeTest.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_NaturalizeTest.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_NaturalizeTest.java Fri Jul  6 10:51:16 2012
@@ -1,49 +1,49 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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 org.apache.isis.core.commons.lang;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Test;
-
-public class StringUtils_NaturalizeTest {
-
-    @Test
-    public void shouldNaturalizeMultipleCamelCase() {
-        assertThat(StringUtils.naturalize("thisIsACamelCasePhrase"), is("This Is A Camel Case Phrase"));
-    }
-
-    @Test
-    public void shouldNaturalizeMultiplePascalCase() {
-        assertThat(StringUtils.naturalize("ThisIsAPascalCasePhrase"), is("This Is A Pascal Case Phrase"));
-    }
-
-    @Test
-    public void shouldNaturalizeSingleWordStartingWithLowerCase() {
-        assertThat(StringUtils.naturalize("foo"), is("Foo"));
-    }
-
-    @Test
-    public void shouldNaturalizeSingleWordStartingWithUpperCase() {
-        assertThat(StringUtils.naturalize("Foo"), is("Foo"));
-    }
-
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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 org.apache.isis.core.commons.lang;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Test;
+
+public class StringUtils_NaturalizeTest {
+
+    @Test
+    public void shouldNaturalizeMultipleCamelCase() {
+        assertThat(StringUtils.naturalize("thisIsACamelCasePhrase"), is("This Is A Camel Case Phrase"));
+    }
+
+    @Test
+    public void shouldNaturalizeMultiplePascalCase() {
+        assertThat(StringUtils.naturalize("ThisIsAPascalCasePhrase"), is("This Is A Pascal Case Phrase"));
+    }
+
+    @Test
+    public void shouldNaturalizeSingleWordStartingWithLowerCase() {
+        assertThat(StringUtils.naturalize("foo"), is("Foo"));
+    }
+
+    @Test
+    public void shouldNaturalizeSingleWordStartingWithUpperCase() {
+        assertThat(StringUtils.naturalize("Foo"), is("Foo"));
+    }
+
+}

Modified: incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_NormalizedTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_NormalizedTest.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_NormalizedTest.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_NormalizedTest.java Fri Jul  6 10:51:16 2012
@@ -1,65 +1,65 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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 org.apache.isis.core.commons.lang;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.util.Arrays;
-import java.util.Collection;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameters;
-
-@RunWith(Parameterized.class)
-public class StringUtils_NormalizedTest {
-
-    @Parameters
-    public static Collection<Object[]> data() {
-        return Arrays.asList(new Object[][] { { null, null, }, // null
-                { "", "", }, // empty string
-                { "yada Foobar", "yada Foobar", }, // alreadyNormalized
-                { "Yada\tFoobar", "Yada Foobar", }, // tab
-                { "Yada\t Foobar", "Yada Foobar", }, // tab and space
-                { "Yada  foobar", "Yada foobar", }, // two spaces
-                { "Yada\nfoobar", "Yada foobar", }, // new line
-                { "Yada\n Foobar", "Yada Foobar", }, // newline and space
-                { "Yada\r\n Foobar", "Yada Foobar", }, // windows newline
-                { "Yada\r Foobar", "Yada Foobar", }, // macos newline
-                { "Yada\r \tFoo \n\tbar  Baz", "Yada Foo bar Baz", }, // multiple
-        });
-    }
-
-    private final String input;
-    private final String expected;
-
-    public StringUtils_NormalizedTest(final String input, final String expected) {
-        this.input = input;
-        this.expected = expected;
-    }
-
-    @Test
-    public void normalizesOk() {
-        assertThat(StringUtils.normalized(input), is(expected));
-    }
-
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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 org.apache.isis.core.commons.lang;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+@RunWith(Parameterized.class)
+public class StringUtils_NormalizedTest {
+
+    @Parameters
+    public static Collection<Object[]> data() {
+        return Arrays.asList(new Object[][] { { null, null, }, // null
+                { "", "", }, // empty string
+                { "yada Foobar", "yada Foobar", }, // alreadyNormalized
+                { "Yada\tFoobar", "Yada Foobar", }, // tab
+                { "Yada\t Foobar", "Yada Foobar", }, // tab and space
+                { "Yada  foobar", "Yada foobar", }, // two spaces
+                { "Yada\nfoobar", "Yada foobar", }, // new line
+                { "Yada\n Foobar", "Yada Foobar", }, // newline and space
+                { "Yada\r\n Foobar", "Yada Foobar", }, // windows newline
+                { "Yada\r Foobar", "Yada Foobar", }, // macos newline
+                { "Yada\r \tFoo \n\tbar  Baz", "Yada Foo bar Baz", }, // multiple
+        });
+    }
+
+    private final String input;
+    private final String expected;
+
+    public StringUtils_NormalizedTest(final String input, final String expected) {
+        this.input = input;
+        this.expected = expected;
+    }
+
+    @Test
+    public void normalizesOk() {
+        assertThat(StringUtils.normalized(input), is(expected));
+    }
+
+}

Modified: incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_NormalizedVarargsTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_NormalizedVarargsTest.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_NormalizedVarargsTest.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_NormalizedVarargsTest.java Fri Jul  6 10:51:16 2012
@@ -1,54 +1,54 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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 org.apache.isis.core.commons.lang;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.util.Arrays;
-import java.util.Collection;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameters;
-
-@RunWith(Parameterized.class)
-public class StringUtils_NormalizedVarargsTest {
-
-    @Parameters
-    public static Collection<Object[]> data() {
-        return Arrays.asList(new Object[][] { { new String[] { "yada Foobar", "Yada\r \tFoo \n\tbar  Baz" }, new String[] { "yada Foobar", "Yada Foo bar Baz" }, }, });
-    }
-
-    private final String[] input;
-    private final String[] expected;
-
-    public StringUtils_NormalizedVarargsTest(final String[] input, final String[] expected) {
-        this.input = input;
-        this.expected = expected;
-    }
-
-    @Test
-    public void normalizesOk() {
-        assertThat(StringUtils.normalized(input), is(expected));
-    }
-
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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 org.apache.isis.core.commons.lang;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+@RunWith(Parameterized.class)
+public class StringUtils_NormalizedVarargsTest {
+
+    @Parameters
+    public static Collection<Object[]> data() {
+        return Arrays.asList(new Object[][] { { new String[] { "yada Foobar", "Yada\r \tFoo \n\tbar  Baz" }, new String[] { "yada Foobar", "Yada Foo bar Baz" }, }, });
+    }
+
+    private final String[] input;
+    private final String[] expected;
+
+    public StringUtils_NormalizedVarargsTest(final String[] input, final String[] expected) {
+        this.input = input;
+        this.expected = expected;
+    }
+
+    @Test
+    public void normalizesOk() {
+        assertThat(StringUtils.normalized(input), is(expected));
+    }
+
+}

Modified: incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_RemoveLeadingWhiteSpace.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_RemoveLeadingWhiteSpace.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_RemoveLeadingWhiteSpace.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_RemoveLeadingWhiteSpace.java Fri Jul  6 10:51:16 2012
@@ -1,51 +1,51 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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 org.apache.isis.core.commons.lang;
-
-import org.hamcrest.CoreMatchers;
-import org.junit.Assert;
-import org.junit.Test;
-
-public class StringUtils_RemoveLeadingWhiteSpace {
-
-    @Test
-    public void whenHasLeadingWhiteSpace() {
-        final String removed = StringUtils.removeLeadingWhiteSpace(" 	 foo");
-        Assert.assertThat(removed, CoreMatchers.is("foo"));
-    }
-
-    @Test
-    public void whenNoLeadingWhiteSpace() {
-        final String removed = StringUtils.removeLeadingWhiteSpace("foo");
-        Assert.assertThat(removed, CoreMatchers.is("foo"));
-    }
-
-    @Test
-    public void empty() {
-        final String removed = StringUtils.removeLeadingWhiteSpace("");
-        Assert.assertThat(removed, CoreMatchers.is(""));
-    }
-
-    @Test
-    public void whenNull() {
-        final String removed = StringUtils.removeLeadingWhiteSpace(null);
-        Assert.assertThat(removed, CoreMatchers.is(CoreMatchers.nullValue()));
-    }
-
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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 org.apache.isis.core.commons.lang;
+
+import org.hamcrest.CoreMatchers;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class StringUtils_RemoveLeadingWhiteSpace {
+
+    @Test
+    public void whenHasLeadingWhiteSpace() {
+        final String removed = StringUtils.removeLeadingWhiteSpace(" 	 foo");
+        Assert.assertThat(removed, CoreMatchers.is("foo"));
+    }
+
+    @Test
+    public void whenNoLeadingWhiteSpace() {
+        final String removed = StringUtils.removeLeadingWhiteSpace("foo");
+        Assert.assertThat(removed, CoreMatchers.is("foo"));
+    }
+
+    @Test
+    public void empty() {
+        final String removed = StringUtils.removeLeadingWhiteSpace("");
+        Assert.assertThat(removed, CoreMatchers.is(""));
+    }
+
+    @Test
+    public void whenNull() {
+        final String removed = StringUtils.removeLeadingWhiteSpace(null);
+        Assert.assertThat(removed, CoreMatchers.is(CoreMatchers.nullValue()));
+    }
+
+}

Modified: incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_SplitOnCommas.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_SplitOnCommas.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_SplitOnCommas.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_SplitOnCommas.java Fri Jul  6 10:51:16 2012
@@ -1,80 +1,80 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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 org.apache.isis.core.commons.lang;
-
-import java.util.List;
-
-import org.hamcrest.CoreMatchers;
-import org.junit.Assert;
-import org.junit.Test;
-
-public class StringUtils_SplitOnCommas {
-
-    @Test
-    public void length() {
-        final List<String> list = StringUtils.splitOnCommas("foo,bar");
-        Assert.assertThat(list.size(), CoreMatchers.is(2));
-    }
-
-    @Test
-    public void elements() {
-        final List<String> list = StringUtils.splitOnCommas("foo,bar");
-        Assert.assertThat(list.get(0), CoreMatchers.is("foo"));
-        Assert.assertThat(list.get(1), CoreMatchers.is("bar"));
-    }
-
-    @Test
-    public void whenHasWhiteSpaceAfterComma() {
-        final List<String> list = StringUtils.splitOnCommas("foo, bar");
-        Assert.assertThat(list.get(0), CoreMatchers.is("foo"));
-        Assert.assertThat(list.get(1), CoreMatchers.is("bar"));
-    }
-
-    @Test
-    public void whenHasLeadingWhiteSpace() {
-        final List<String> list = StringUtils.splitOnCommas(" foo, bar");
-        Assert.assertThat(list.get(0), CoreMatchers.is("foo"));
-        Assert.assertThat(list.get(1), CoreMatchers.is("bar"));
-    }
-
-    @Test
-    public void whenNull() {
-        final List<String> list = StringUtils.splitOnCommas(null);
-        Assert.assertThat(list, CoreMatchers.is(CoreMatchers.nullValue()));
-    }
-
-    @Test
-    public void whenEmpty() {
-        final List<String> list = StringUtils.splitOnCommas("");
-        Assert.assertThat(list.size(), CoreMatchers.is(0));
-    }
-
-    @Test
-    public void whenOnlyWhiteSpace() {
-        final List<String> list = StringUtils.splitOnCommas(" ");
-        Assert.assertThat(list.size(), CoreMatchers.is(0));
-    }
-
-    @Test
-    public void whenOnlyWhiteSpaceTabs() {
-        final List<String> list = StringUtils.splitOnCommas("\t");
-        Assert.assertThat(list.size(), CoreMatchers.is(0));
-    }
-
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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 org.apache.isis.core.commons.lang;
+
+import java.util.List;
+
+import org.hamcrest.CoreMatchers;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class StringUtils_SplitOnCommas {
+
+    @Test
+    public void length() {
+        final List<String> list = StringUtils.splitOnCommas("foo,bar");
+        Assert.assertThat(list.size(), CoreMatchers.is(2));
+    }
+
+    @Test
+    public void elements() {
+        final List<String> list = StringUtils.splitOnCommas("foo,bar");
+        Assert.assertThat(list.get(0), CoreMatchers.is("foo"));
+        Assert.assertThat(list.get(1), CoreMatchers.is("bar"));
+    }
+
+    @Test
+    public void whenHasWhiteSpaceAfterComma() {
+        final List<String> list = StringUtils.splitOnCommas("foo, bar");
+        Assert.assertThat(list.get(0), CoreMatchers.is("foo"));
+        Assert.assertThat(list.get(1), CoreMatchers.is("bar"));
+    }
+
+    @Test
+    public void whenHasLeadingWhiteSpace() {
+        final List<String> list = StringUtils.splitOnCommas(" foo, bar");
+        Assert.assertThat(list.get(0), CoreMatchers.is("foo"));
+        Assert.assertThat(list.get(1), CoreMatchers.is("bar"));
+    }
+
+    @Test
+    public void whenNull() {
+        final List<String> list = StringUtils.splitOnCommas(null);
+        Assert.assertThat(list, CoreMatchers.is(CoreMatchers.nullValue()));
+    }
+
+    @Test
+    public void whenEmpty() {
+        final List<String> list = StringUtils.splitOnCommas("");
+        Assert.assertThat(list.size(), CoreMatchers.is(0));
+    }
+
+    @Test
+    public void whenOnlyWhiteSpace() {
+        final List<String> list = StringUtils.splitOnCommas(" ");
+        Assert.assertThat(list.size(), CoreMatchers.is(0));
+    }
+
+    @Test
+    public void whenOnlyWhiteSpaceTabs() {
+        final List<String> list = StringUtils.splitOnCommas("\t");
+        Assert.assertThat(list.size(), CoreMatchers.is(0));
+    }
+
+}

Modified: incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_StripLeadingSlashTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_StripLeadingSlashTest.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_StripLeadingSlashTest.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_StripLeadingSlashTest.java Fri Jul  6 10:51:16 2012
@@ -1,49 +1,49 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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 org.apache.isis.core.commons.lang;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Test;
-
-public class StringUtils_StripLeadingSlashTest {
-
-    @Test
-    public void shouldStripIfThereIsOne() {
-        assertThat(StringUtils.stripLeadingSlash("/foobar"), is("foobar"));
-    }
-
-    @Test
-    public void shouldLeaveUnchangedIfThereIsNone() {
-        assertThat(StringUtils.stripLeadingSlash("foobar"), is("foobar"));
-    }
-
-    @Test
-    public void shouldConvertSolitarySlashToEmptyString() {
-        assertThat(StringUtils.stripLeadingSlash("/"), is(""));
-    }
-
-    @Test(expected = NullPointerException.class)
-    public void shouldFailOnNull() {
-        StringUtils.stripLeadingSlash(null);
-    }
-
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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 org.apache.isis.core.commons.lang;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Test;
+
+public class StringUtils_StripLeadingSlashTest {
+
+    @Test
+    public void shouldStripIfThereIsOne() {
+        assertThat(StringUtils.stripLeadingSlash("/foobar"), is("foobar"));
+    }
+
+    @Test
+    public void shouldLeaveUnchangedIfThereIsNone() {
+        assertThat(StringUtils.stripLeadingSlash("foobar"), is("foobar"));
+    }
+
+    @Test
+    public void shouldConvertSolitarySlashToEmptyString() {
+        assertThat(StringUtils.stripLeadingSlash("/"), is(""));
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void shouldFailOnNull() {
+        StringUtils.stripLeadingSlash(null);
+    }
+
+}

Modified: incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_StripNewLinesTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_StripNewLinesTest.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_StripNewLinesTest.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_StripNewLinesTest.java Fri Jul  6 10:51:16 2012
@@ -1,59 +1,59 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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 org.apache.isis.core.commons.lang;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Test;
-
-public class StringUtils_StripNewLinesTest {
-
-    @Test
-    public void shouldDoNothingIfNone() {
-        assertThat(StringUtils.stripNewLines("abc"), is("abc"));
-    }
-
-    @Test
-    public void shouldStripIfJustBackslashN() {
-        assertThat(StringUtils.stripNewLines("abc\n"), is("abc"));
-    }
-
-    @Test
-    public void shouldStripIfBackslashRBackslashN() {
-        assertThat(StringUtils.stripNewLines("abc\r\n"), is("abc"));
-    }
-
-    @Test
-    public void shouldStripIfJustBackslashR() {
-        assertThat(StringUtils.stripNewLines("abc\r"), is("abc"));
-    }
-
-    @Test
-    public void shouldStripIfSeveral() {
-        assertThat(StringUtils.stripNewLines("abc\r\ndef\r\n"), is("abcdef"));
-    }
-
-    @Test
-    public void shouldStripIfBackslashRBackslashNBackslashR() {
-        assertThat(StringUtils.stripNewLines("abc\n\r\ndef"), is("abcdef"));
-    }
-
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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 org.apache.isis.core.commons.lang;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Test;
+
+public class StringUtils_StripNewLinesTest {
+
+    @Test
+    public void shouldDoNothingIfNone() {
+        assertThat(StringUtils.stripNewLines("abc"), is("abc"));
+    }
+
+    @Test
+    public void shouldStripIfJustBackslashN() {
+        assertThat(StringUtils.stripNewLines("abc\n"), is("abc"));
+    }
+
+    @Test
+    public void shouldStripIfBackslashRBackslashN() {
+        assertThat(StringUtils.stripNewLines("abc\r\n"), is("abc"));
+    }
+
+    @Test
+    public void shouldStripIfJustBackslashR() {
+        assertThat(StringUtils.stripNewLines("abc\r"), is("abc"));
+    }
+
+    @Test
+    public void shouldStripIfSeveral() {
+        assertThat(StringUtils.stripNewLines("abc\r\ndef\r\n"), is("abcdef"));
+    }
+
+    @Test
+    public void shouldStripIfBackslashRBackslashNBackslashR() {
+        assertThat(StringUtils.stripNewLines("abc\n\r\ndef"), is("abcdef"));
+    }
+
+}

Modified: incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_camelLowerFirst.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_camelLowerFirst.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_camelLowerFirst.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/StringUtils_camelLowerFirst.java Fri Jul  6 10:51:16 2012
@@ -1,38 +1,38 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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 org.apache.isis.core.commons.lang;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Test;
-
-public class StringUtils_camelLowerFirst {
-
-    @Test
-    public void asLowerCase() {
-        assertThat(StringUtils.camelLowerFirst("An Upper Case"), is("anUpperCase"));
-        assertThat(StringUtils.camelLowerFirst("a Lower Case"), is("aLowerCase"));
-        assertThat(StringUtils.camelLowerFirst("AnUpperCase"), is("anUpperCase"));
-        assertThat(StringUtils.camelLowerFirst("aLowerCase"), is("aLowerCase"));
-        assertThat(StringUtils.camelLowerFirst("a  Lower  Case"), is("aLowerCase"));
-    }
-
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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 org.apache.isis.core.commons.lang;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Test;
+
+public class StringUtils_camelLowerFirst {
+
+    @Test
+    public void asLowerCase() {
+        assertThat(StringUtils.camelLowerFirst("An Upper Case"), is("anUpperCase"));
+        assertThat(StringUtils.camelLowerFirst("a Lower Case"), is("aLowerCase"));
+        assertThat(StringUtils.camelLowerFirst("AnUpperCase"), is("anUpperCase"));
+        assertThat(StringUtils.camelLowerFirst("aLowerCase"), is("aLowerCase"));
+        assertThat(StringUtils.camelLowerFirst("a  Lower  Case"), is("aLowerCase"));
+    }
+
+}



Mime
View raw message