You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2014/02/18 14:59:20 UTC
svn commit: r1569326 [2/2] - in
/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src:
main/java/org/apache/myfaces/tobago/component/
main/java/org/apache/myfaces/tobago/context/
main/java/org/apache/myfaces/tobago/facelets/ main/java/org/apache/myface...
Added: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/BootstrapPartitionUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/BootstrapPartitionUnitTest.java?rev=1569326&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/BootstrapPartitionUnitTest.java (added)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/BootstrapPartitionUnitTest.java Tue Feb 18 13:59:19 2014
@@ -0,0 +1,40 @@
+package org.apache.myfaces.tobago.layout;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class BootstrapPartitionUnitTest {
+
+ @Test
+ public void testArray() {
+ Assert.assertArrayEquals(
+ new Integer[]{12}, new BootstrapPartition().getParts()); // will be fixed
+ Assert.assertArrayEquals(
+ new Integer[]{12}, new BootstrapPartition(12).getParts());
+ Assert.assertArrayEquals(
+ new Integer[]{1,11}, new BootstrapPartition(1,11).getParts());
+ Assert.assertArrayEquals(
+ new Integer[]{1,11}, new BootstrapPartition(1,12).getParts()); // will be fixed
+ Assert.assertArrayEquals(
+ new Integer[]{1,2,3,4,2}, new BootstrapPartition(1,2,3,4,5).getParts()); // will be fixed
+ Assert.assertArrayEquals(
+ new Integer[]{1,1,1,1,1,7}, new BootstrapPartition(-1,-2,-3,-4,-5).getParts()); // will be fixed
+ }
+
+ @Test
+ public void testString() {
+ Assert.assertArrayEquals(
+ new Integer[]{12}, BootstrapPartition.valueOf("").getParts()); // will be fixed
+ Assert.assertArrayEquals(
+ new Integer[]{12}, BootstrapPartition.valueOf("12").getParts());
+ Assert.assertArrayEquals(
+ new Integer[]{1,11}, BootstrapPartition.valueOf("1;11").getParts());
+ Assert.assertArrayEquals(
+ new Integer[]{1,11}, BootstrapPartition.valueOf("1;12").getParts()); // will be fixed
+ Assert.assertArrayEquals(
+ new Integer[]{1,2,3,4,2}, BootstrapPartition.valueOf("1;2;3;4;5").getParts()); // will be fixed
+ Assert.assertArrayEquals(
+ new Integer[]{1,1,1,1,1,7}, BootstrapPartition.valueOf("-1;-2;-3;-4;-5").getParts()); // will be fixed
+ }
+
+}