You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2014/07/03 17:01:20 UTC
[14/63] [abbrv] [partial] ISIS-832: mothballing components
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/BoundsTest.java
----------------------------------------------------------------------
diff --git a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/BoundsTest.java b/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/BoundsTest.java
deleted file mode 100644
index 7ab3da2..0000000
--- a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/BoundsTest.java
+++ /dev/null
@@ -1,272 +0,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.viewer.dnd.viewer.drawing;
-
-import junit.framework.TestCase;
-
-import org.apache.isis.viewer.dnd.drawing.Bounds;
-import org.apache.isis.viewer.dnd.drawing.Location;
-import org.apache.isis.viewer.dnd.drawing.Padding;
-import org.apache.isis.viewer.dnd.drawing.Size;
-
-public class BoundsTest extends TestCase {
-
- public static void main(final String[] args) {
- junit.textui.TestRunner.run(BoundsTest.class);
- }
-
- private Bounds b;
-
- @Override
- protected void setUp() throws Exception {
- org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.OFF);
- b = new Bounds(5, 10, 10, 20);
- }
-
- public void testContains() {
- assertTrue(b.contains(new Location(8, 15)));
- assertTrue(b.contains(new Location(5, 10)));
- assertFalse(b.contains(new Location(4, 10)));
- assertFalse(b.contains(new Location(15, 10)));
- assertTrue(b.contains(new Location(10, 29)));
- }
-
- public void testNotEquals() {
- Bounds c = new Bounds(0, 10, 10, 20);
- assertFalse(c.equals(b));
-
- c = new Bounds(5, 0, 10, 20);
- assertFalse(c.equals(b));
-
- c = new Bounds(5, 10, 0, 20);
- assertFalse(c.equals(b));
-
- c = new Bounds(5, 10, 10, 0);
- assertFalse(c.equals(b));
- }
-
- public void testEquals() {
- final Bounds c = new Bounds(5, 10, 10, 20);
- assertTrue(c.equals(b));
- assertTrue(b.equals(c));
- }
-
- public void testContracSize() {
- b.contract(new Size(5, 12));
- assertEquals(5, b.getWidth());
- assertEquals(8, b.getHeight());
- }
-
- public void testContractHeight() {
- b.contractHeight(12);
- assertEquals(8, b.getHeight());
- }
-
- public void testContractPadding() {
- b.contract(new Padding(2, 4, 1, 3));
- assertEquals(3, b.getWidth());
- assertEquals(17, b.getHeight());
- assertEquals(9, b.getX());
- assertEquals(12, b.getY());
- }
-
- public void testContracWidth() {
- b.contractWidth(5);
- assertEquals(5, b.getWidth());
- }
-
- public void testCopyBounds() {
- final Bounds c = new Bounds();
- c.setBounds(b);
-
- assertEquals(5, b.getX());
- assertEquals(10, b.getY());
- assertEquals(10, b.getWidth());
- assertEquals(20, b.getHeight());
- }
-
- public void testDefaultBounds() {
- final Bounds b = new Bounds();
- assertEquals(0, b.getX());
- assertEquals(0, b.getY());
- assertEquals(0, b.getWidth());
- assertEquals(0, b.getHeight());
- }
-
- public void testDownLeftIntersects() {
- final Bounds c = new Bounds(b);
- c.translate(-5, -5);
- assertTrue(b.intersects(c));
-
- c.translate(-b.getWidth(), 0);
- assertFalse(b.intersects(c));
- }
-
- public void testEnclosingUnion() {
- final Bounds c = new Bounds(10, 20, 5, 5);
- final Bounds u = new Bounds(b);
- u.union(c);
- assertEquals(b, u);
- }
-
- public void testExplicitBounds() {
- assertEquals(5, b.getX());
- assertEquals(10, b.getY());
- assertEquals(10, b.getWidth());
- assertEquals(20, b.getHeight());
-
- final Bounds b1 = new Bounds(b);
- assertEquals(5, b1.getX());
- assertEquals(10, b1.getY());
- assertEquals(10, b1.getWidth());
- assertEquals(20, b1.getHeight());
-
- final Bounds b2 = new Bounds(new Location(10, 20), new Size(8, 16));
- assertEquals(10, b2.getX());
- assertEquals(20, b2.getY());
- assertEquals(8, b2.getWidth());
- assertEquals(16, b2.getHeight());
-
- final Bounds b3 = new Bounds(new Size(5, 10));
- assertEquals(0, b3.getX());
- assertEquals(0, b3.getY());
- assertEquals(5, b3.getWidth());
- assertEquals(10, b3.getHeight());
- }
-
- public void testFarPoint() {
- assertEquals(5, b.getX());
- assertEquals(14, b.getX2());
- assertEquals(10, b.getY());
- assertEquals(29, b.getY2());
- }
-
- public void testgrow() {
- b.extend(10, 5);
- assertEquals(5, b.getX());
- assertEquals(10, b.getY());
- assertEquals(20, b.getWidth());
- assertEquals(25, b.getHeight());
- }
-
- public void testLimitBoundsWhenTooTall() {
- final Bounds b2 = new Bounds(10, 0, 4, 30);
- assertTrue(b.limitBounds(b2));
- assertEquals(new Bounds(10, 10, 4, 20), b2);
- }
-
- public void testLimitBoundsWhenTooWide() {
- final Bounds b2 = new Bounds(0, 12, 20, 5);
- assertTrue(b.limitBounds(b2));
- assertEquals(new Bounds(5, 12, 10, 5), b2);
- }
-
- public void testLimitBoundsWithHorizontalOverlap() {
- final Bounds b2 = new Bounds(10, 12, 10, 5);
- assertTrue(b.limitBounds(b2));
- assertEquals(new Bounds(5, 12, 10, 5), b2);
- }
-
- public void testLimitBoundsWithNoOverlap() {
- final Bounds b2 = new Bounds(7, 12, 5, 5);
- assertFalse(b.limitBounds(b2));
- assertEquals(new Bounds(7, 12, 5, 5), b2);
- }
-
- public void testLimitBoundsWithVerticalOverlap() {
- final Bounds b2 = new Bounds(5, 20, 5, 20);
- assertTrue(b.limitBounds(b2));
- assertEquals(new Bounds(5, 10, 5, 20), b2);
- }
-
- public void testNonOverlappingUnion() {
- final Bounds c = new Bounds(20, 40, 10, 20);
- final Bounds u = new Bounds(b);
- u.union(c);
- assertEquals(new Bounds(5, 10, 25, 50), u);
- }
-
- public void testOverlappingIntersects() {
- Bounds c = new Bounds(b);
- c.translate(-5, -5);
- c.extend(10, 10);
- assertTrue(b.intersects(c));
-
- c = new Bounds(b);
- c.translate(5, 5);
- c.extend(-10, -10);
- assertTrue(b.intersects(c));
- }
-
- public void testOverlappingUnion() {
- final Bounds c = new Bounds(3, 5, 10, 10);
- final Bounds u = new Bounds(b);
- u.union(c);
- assertEquals(new Bounds(3, 5, 12, 25), u);
- }
-
- public void testTranslate() {
- b.translate(10, 5);
- assertEquals(15, b.getX());
- assertEquals(15, b.getY());
- assertEquals(10, b.getWidth());
- assertEquals(20, b.getHeight());
- }
-
- public void testUpRightIntersects() {
- final Bounds c = new Bounds(b);
- c.translate(5, 5);
- assertTrue(b.intersects(c));
-
- c.translate(b.getWidth(), 0);
- assertFalse(b.intersects(c));
- }
-
- public void testXNoOverlapToLeft() {
- final Bounds c = new Bounds(1, 15, 4, 0);
- assertFalse(b.intersects(c));
- }
-
- public void testXNoOverlapToRight() {
- final Bounds c = new Bounds(15, 15, 5, 0);
- assertFalse(b.intersects(c));
- }
-
- public void testXOverlapInCenter() {
- final Bounds c = new Bounds(6, 15, 2, 0);
- assertTrue(b.intersects(c));
- }
-
- public void testXOverlapToLeft() {
- final Bounds c = new Bounds(1, 15, 6, 0);
- assertTrue(b.intersects(c));
- }
-
- public void testXOverlapToRight() {
- final Bounds c = new Bounds(14, 15, 5, 0);
- assertTrue(b.intersects(c));
- }
-
- public void testYOverlapToTop() {
- final Bounds c = new Bounds(10, 29, 0, 5);
- assertTrue(b.intersects(c));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/DummyText.java
----------------------------------------------------------------------
diff --git a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/DummyText.java b/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/DummyText.java
deleted file mode 100644
index e41f97f..0000000
--- a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/DummyText.java
+++ /dev/null
@@ -1,85 +0,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.viewer.dnd.viewer.drawing;
-
-import org.apache.isis.viewer.dnd.drawing.Text;
-
-public class DummyText implements Text {
-
- public DummyText() {
- super();
- }
-
- @Override
- public int charWidth(final char c) {
- return 10;
- }
-
- @Override
- public int getAscent() {
- return 2;
- }
-
- @Override
- public int getDescent() {
- return 4;
- }
-
- @Override
- public int getMidPoint() {
- return 1;
- }
-
- @Override
- public int getTextHeight() {
- return 8;
- }
-
- @Override
- public int getLineHeight() {
- return getAscent() + getTextHeight() + getDescent();
- }
-
- @Override
- public int getLineSpacing() {
- return getLineHeight() + 5;
- }
-
- @Override
- public int stringHeight(final String text, final int width) {
- return getLineHeight();
- }
-
- @Override
- public int stringWidth(final String text) {
- return text.length() * charWidth('x');
- }
-
- @Override
- public int stringWidth(final String message, final int maxWidth) {
- return 0;
- }
-
- @Override
- public String getName() {
- return null;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/LocationTest.java
----------------------------------------------------------------------
diff --git a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/LocationTest.java b/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/LocationTest.java
deleted file mode 100644
index 3f16562..0000000
--- a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/LocationTest.java
+++ /dev/null
@@ -1,46 +0,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.viewer.dnd.viewer.drawing;
-
-import junit.framework.TestCase;
-
-import org.apache.isis.viewer.dnd.drawing.Location;
-
-public class LocationTest extends TestCase {
-
- public static void main(final String[] args) {
- junit.textui.TestRunner.run(LocationTest.class);
- }
-
- public void testCopy() {
- final Location l = new Location(10, 20);
- final Location m = new Location(l);
- assertTrue(l != m);
- assertEquals(l, m);
- }
-
- public void testTranslate() {
- final Location l = new Location(10, 20);
- l.move(5, 10);
- assertEquals(new Location(15, 30), l);
- l.move(-10, -5);
- assertEquals(new Location(5, 25), l);
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/PaddingTest.java
----------------------------------------------------------------------
diff --git a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/PaddingTest.java b/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/PaddingTest.java
deleted file mode 100644
index c17a14a..0000000
--- a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/PaddingTest.java
+++ /dev/null
@@ -1,65 +0,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.viewer.dnd.viewer.drawing;
-
-import junit.framework.TestCase;
-
-import org.apache.isis.viewer.dnd.drawing.Padding;
-
-public class PaddingTest extends TestCase {
-
- private Padding p;
-
- public static void main(final String[] args) {
- junit.textui.TestRunner.run(PaddingTest.class);
- }
-
- @Override
- protected void setUp() throws Exception {
- p = new Padding(2, 3, 4, 5);
- }
-
- public void testCopy() {
- final Padding q = new Padding(p);
- assertTrue(p != q);
- assertEquals(p, q);
- }
-
- public void testValues() {
- assertEquals(2, p.getTop());
- assertEquals(3, p.getLeft());
- assertEquals(4, p.getBottom());
- assertEquals(5, p.getRight());
- }
-
- public void testExtend() {
- p.extendTop(10);
- assertEquals(new Padding(12, 3, 4, 5), p);
-
- p.extendLeft(10);
- assertEquals(new Padding(12, 13, 4, 5), p);
-
- p.extendBottom(10);
- assertEquals(new Padding(12, 13, 14, 5), p);
-
- p.extendRight(10);
- assertEquals(new Padding(12, 13, 14, 15), p);
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/ShapeTest.java
----------------------------------------------------------------------
diff --git a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/ShapeTest.java b/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/ShapeTest.java
deleted file mode 100644
index 28ea7d4..0000000
--- a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/ShapeTest.java
+++ /dev/null
@@ -1,95 +0,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.viewer.dnd.viewer.drawing;
-
-import junit.framework.TestCase;
-
-import org.apache.isis.viewer.dnd.drawing.Shape;
-
-public class ShapeTest extends TestCase {
-
- private Shape shape;
-
- public static void main(final String[] args) {
- junit.textui.TestRunner.run(ShapeTest.class);
- }
-
- @Override
- protected void setUp() throws Exception {
- shape = new Shape();
- }
-
- public void testNew() {
- assertEquals(0, shape.count());
- assertEquals(0, shape.getX().length);
- assertEquals(0, shape.getY().length);
- }
-
- public void testAddPoint() {
- shape.addPoint(10, 12);
- assertEquals(1, shape.count());
- assertEquals(10, shape.getX()[0]);
- assertEquals(12, shape.getY()[0]);
- }
-
- public void testAddThreePoints() {
- shape.addPoint(10, 12);
- shape.addPoint(8, 5);
- shape.addPoint(0, 2);
- assertEquals(3, shape.count());
- assertEquals(10, shape.getX()[0]);
- assertEquals(12, shape.getY()[0]);
- assertEquals(8, shape.getX()[1]);
- assertEquals(5, shape.getY()[1]);
- assertEquals(0, shape.getX()[2]);
- assertEquals(2, shape.getY()[2]);
- }
-
- public void testCreateCopy() {
- shape.addPoint(10, 12);
- shape.addPoint(8, 5);
- shape.addPoint(0, 2);
-
- final Shape copy = new Shape(shape);
-
- assertEquals(3, copy.count());
- assertEquals(10, copy.getX()[0]);
- assertEquals(12, copy.getY()[0]);
- assertEquals(8, copy.getX()[1]);
- assertEquals(5, copy.getY()[1]);
- assertEquals(0, copy.getX()[2]);
- assertEquals(2, copy.getY()[2]);
- }
-
- public void testTransform() {
- shape.addPoint(10, 12);
- shape.addPoint(8, 5);
- shape.addPoint(0, 2);
- shape.translate(10, 20);
- assertEquals(3, shape.count());
- assertEquals(20, shape.getX()[0]);
- assertEquals(32, shape.getY()[0]);
- assertEquals(18, shape.getX()[1]);
- assertEquals(25, shape.getY()[1]);
- assertEquals(10, shape.getX()[2]);
- assertEquals(22, shape.getY()[2]);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/ShapeTest2.java
----------------------------------------------------------------------
diff --git a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/ShapeTest2.java b/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/ShapeTest2.java
deleted file mode 100644
index 3fac41e..0000000
--- a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/ShapeTest2.java
+++ /dev/null
@@ -1,60 +0,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.viewer.dnd.viewer.drawing;
-
-import junit.framework.TestCase;
-
-import org.apache.isis.viewer.dnd.drawing.Shape;
-
-public class ShapeTest2 extends TestCase {
-
- private Shape shape;
-
- public static void main(final String[] args) {
- junit.textui.TestRunner.run(ShapeTest2.class);
- }
-
- @Override
- protected void setUp() throws Exception {
- shape = new Shape(10, 20);
- }
-
- public void testNew() {
- assertEquals(1, shape.count());
- assertEquals(10, shape.getX()[0]);
- assertEquals(20, shape.getY()[0]);
- }
-
- public void testAddLine() {
- shape.addVector(5, 10);
- assertEquals(2, shape.count());
- assertEquals(15, shape.getX()[1]);
- assertEquals(30, shape.getY()[1]);
- }
-
- public void testAddTwoLines() {
- shape.addVector(5, 10);
- shape.addVector(-8, -5);
- assertEquals(3, shape.count());
- assertEquals(7, shape.getX()[2]);
- assertEquals(25, shape.getY()[2]);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/SizeTest.java
----------------------------------------------------------------------
diff --git a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/SizeTest.java b/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/SizeTest.java
deleted file mode 100644
index c2636c4..0000000
--- a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/drawing/SizeTest.java
+++ /dev/null
@@ -1,80 +0,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.viewer.dnd.viewer.drawing;
-
-import junit.framework.TestCase;
-
-import org.apache.isis.viewer.dnd.drawing.Padding;
-import org.apache.isis.viewer.dnd.drawing.Size;
-
-public class SizeTest extends TestCase {
-
- private Size s;
-
- public static void main(final String[] args) {
- junit.textui.TestRunner.run(SizeTest.class);
- }
-
- @Override
- protected void setUp() throws Exception {
- org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.OFF);
-
- s = new Size(10, 20);
- }
-
- public void testCopy() {
- final Size m = new Size(s);
- assertTrue(s != m);
- assertEquals(s, m);
- }
-
- public void testEnsure() {
- s.ensureWidth(18);
- assertEquals(new Size(18, 20), s);
- s.ensureWidth(12);
- assertEquals(new Size(18, 20), s);
-
- s.ensureHeight(16);
- assertEquals(new Size(18, 20), s);
- s.ensureHeight(26);
- assertEquals(new Size(18, 26), s);
- }
-
- public void addPadding() {
- s.extend(new Padding(1, 2, 3, 4));
- assertEquals(new Size(14, 26), s);
- }
-
- public void testExtend() {
- s.extendWidth(8);
- assertEquals(new Size(18, 20), s);
-
- s.extendHeight(6);
- assertEquals(new Size(18, 26), s);
-
- s.extend(new Size(3, 5));
- assertEquals(new Size(21, 31), s);
-
- s.extend(5, 3);
- assertEquals(new Size(26, 34), s);
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/table/TableRowLayoutTest.java
----------------------------------------------------------------------
diff --git a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/table/TableRowLayoutTest.java b/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/table/TableRowLayoutTest.java
deleted file mode 100644
index 0ccfd16..0000000
--- a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/table/TableRowLayoutTest.java
+++ /dev/null
@@ -1,80 +0,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.viewer.dnd.viewer.table;
-
-import junit.framework.Assert;
-
-import org.jmock.Expectations;
-import org.jmock.Mockery;
-import org.jmock.auto.Mock;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
-import org.apache.isis.viewer.dnd.DummyView;
-import org.apache.isis.viewer.dnd.TestToolkit;
-import org.apache.isis.viewer.dnd.drawing.Size;
-import org.apache.isis.viewer.dnd.table.TableAxis;
-import org.apache.isis.viewer.dnd.table.TableRowLayout;
-import org.apache.isis.viewer.dnd.view.View;
-
-public class TableRowLayoutTest {
-
- @Rule
- public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
-
- @Mock
- private IsisConfiguration mockConfiguration;
-
- @Test
- public void layout() throws Exception {
- IsisContext.setConfiguration(mockConfiguration);
- TestToolkit.createInstance();
-
- final DummyView row = new DummyView();
- final DummyView cell1 = new DummyView();
- final DummyView cell2 = new DummyView();
- row.setupSubviews(new View[] { cell1, cell2 });
-
- final Mockery mockery = new Mockery();
- final TableAxis tableAxis = mockery.mock(TableAxis.class);
-
- mockery.checking(new Expectations() {
- {
- one(tableAxis).getColumnWidth(0);
- will(returnValue(80));
- one(tableAxis).getColumnWidth(1);
- will(returnValue(80));
- }
- });
-
- final TableRowLayout layout = new TableRowLayout(tableAxis);
-
- layout.layout(row, new Size(200, 200));
- mockery.assertIsSatisfied();
-
- Assert.assertEquals(new Size(80, 10), cell1.getSize());
- Assert.assertEquals(new Size(80, 10), cell2.getSize());
-
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/tree/TreeBrowserFrameTest.java
----------------------------------------------------------------------
diff --git a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/tree/TreeBrowserFrameTest.java b/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/tree/TreeBrowserFrameTest.java
deleted file mode 100644
index 959cab8..0000000
--- a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/tree/TreeBrowserFrameTest.java
+++ /dev/null
@@ -1,199 +0,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.viewer.dnd.viewer.tree;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.viewer.dnd.DummyContent;
-import org.apache.isis.viewer.dnd.DummyView;
-import org.apache.isis.viewer.dnd.DummyViewSpecification;
-import org.apache.isis.viewer.dnd.DummyWorkspaceView;
-import org.apache.isis.viewer.dnd.TestToolkit;
-import org.apache.isis.viewer.dnd.drawing.Location;
-import org.apache.isis.viewer.dnd.drawing.Size;
-import org.apache.isis.viewer.dnd.view.View;
-import org.apache.isis.viewer.dnd.view.composite.MasterDetailPanel;
-
-/*
- * Note that the frame only contains two views and no additional spacing, hence no drawing. The
- * width is the total of the two decorated views, while the height is the largest of the two.
- */
-public class TreeBrowserFrameTest {
-
- @Rule
- public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
-
- private DummyWorkspaceView dummyWorkspace;
- private MasterDetailPanel frame;
-
- @Before
- public void setUp() throws Exception {
-
- TestToolkit.createInstance();
-
- dummyWorkspace = new DummyWorkspaceView();
-
- final DummyContent content = new DummyContent() {};
- final DummyViewSpecification rhsSpec = new DummyViewSpecification();
- rhsSpec.setupCreatedViewsSize(new Size(200, 300));
- final DummyViewSpecification lhsSpec = new DummyViewSpecification();
- lhsSpec.setupCreatedViewsSize(new Size(350, 250));
- frame = new MasterDetailPanel(content, rhsSpec, lhsSpec);
- frame.setParent(dummyWorkspace);
- }
-
- @Test
- public void testViewsParents() throws Exception {
- final View[] subviews = frame.getSubviews();
- assertEquals(2, subviews.length);
- final View lhsView = subviews[0];
- assertEquals(frame, lhsView.getParent());
- final View rhsView = subviews[1];
- assertEquals(frame, rhsView.getParent());
- }
-
- @Test
- public void testLeftViewSize() {
- // width => width of view (150) + scroll border (0) + resize border (7)
- // => 159
- // height => height of view (250) + scroll border (0) => 250
- assertEquals(leftView(), leftView().getView());
- assertEquals(new Size(350 + 7, 250), leftView().getView().getRequiredSize(Size.createMax()));
- }
-
- @Test
- public void testInitialBlankViewSize() {
- // 120 is the minimum width given to the blan view by the
- // MasterDetailPanel
- assertEquals(new Size(120, 0), rightView().getRequiredSize(Size.createMax()));
- }
-
- @Test
- public void testInitialBlankViewSizeWithinALimitedSpace() {
- assertEquals(new Size(100, 0), rightView().getRequiredSize(new Size(100, 200)));
- }
-
- private View leftView() {
- return frame.getSubviews()[0];
- }
-
- private View rightView() {
- return frame.getSubviews()[1];
- }
-
- @Test
- public void testTotalRequiredSize() {
- assertEquals(new Size(350 + 7 + 120, 250), frame.getRequiredSize(Size.createMax()));
- }
-
- @Test
- public void testInitialSize() {
- assertEquals(new Size(), frame.getSize());
- }
-
- @Test
- public void testLayoutInReducedSpaceReducesSizeOfLeftView() {
- layoutFrameInReducedSpace();
- assertEquals("retains original size", new Size(400 - 120, 200), leftView().getSize());
-
- // scroll border 16 pixels; resize border 5 pixels; total 21 pixels
- // assertEquals("width reduces", new Size(100, 200),
- // rightView.getSize());
-
- // assertEquals(new Location(100, 0), rightView.getLocation());
- }
-
- @Test
- public void testLayoutInReducedSpaceLeaveBlanksWidthUnchangedAsIsAlreadyMinimumSize() {
- layoutFrameInReducedSpace();
- assertEquals("retains original size", new Size(120, 200), rightView().getSize());
- }
-
- @Test
- public void testLayoutInReducedSpaceReducesSizeOfRightView() {
- frame.removeView(rightView());
- frame.addView(new DummyView(350, 210));
- layoutFrameInReducedSpace();
- final int expectedWidth = 400 - 206 - 1; // total width -
- assertEquals("retains original size", new Size(expectedWidth, 210), rightView().getSize());
- }
-
- @Test
- public void testLayoutInReducedSpaceReducesSizeOfLeftViewInProportion() {
- frame.removeView(rightView());
- frame.addView(new DummyView(350, 210));
- layoutFrameInReducedSpace();
- assertEquals("retains original size", new Size(200 + 7 - 1, 210), leftView().getSize());
- }
-
- /*
- * public void testLayoutInReducedSpaceReducesSizeOfRightView() {
- * layoutFrameInReducedSpace(); assertEquals("retains original size", new
- * Size(120, 200), rightView().getSize()); }
- */
-
- private void layoutFrameInReducedSpace() {
- frame.invalidateLayout();
- frame.setSize(new Size(400, 200));
- frame.layout();
- }
-
- @Test
- public void testLayoutGivesLeftViewAllItWants() {
- layoutFrameInRequiredSpace();
- assertEquals("retains original size", new Size(350 + 7, 250), leftView().getSize());
- }
-
- @Test
- public void testLayoutGivesRightViewAllItWants() {
- layoutFrameInRequiredSpace();
- assertEquals("height should be the same as left (including borders)", new Size(120, 250), rightView().getSize());
- }
-
- @Test
- public void testLayoutLocatesLeftViewOnLeft() {
- layoutFrameInRequiredSpace();
- assertEquals(new Location(), leftView().getLocation());
- }
-
- @Test
- public void testLayoutLocatesRightViewNextToLeftView() {
- layoutFrameInRequiredSpace();
- assertEquals(new Location(350 + 7, 0), rightView().getLocation());
- }
-
- private void layoutFrameInRequiredSpace() {
- frame.invalidateLayout();
- frame.setSize(new Size(350 + 7 + 120, 250));
- frame.layout();
- }
-
- @Test
- public void testSubviews() {
- final View[] subviews = frame.getSubviews();
- assertEquals(leftView().getView(), subviews[0]);
- assertEquals(rightView().getView(), subviews[1]);
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/view/AbstractViewTest.java
----------------------------------------------------------------------
diff --git a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/view/AbstractViewTest.java b/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/view/AbstractViewTest.java
deleted file mode 100644
index 92fc80c..0000000
--- a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/view/AbstractViewTest.java
+++ /dev/null
@@ -1,101 +0,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.viewer.dnd.viewer.view;
-
-import junit.framework.TestCase;
-
-import org.apache.isis.viewer.dnd.drawing.Bounds;
-import org.apache.isis.viewer.dnd.drawing.Location;
-import org.apache.isis.viewer.dnd.drawing.Padding;
-import org.apache.isis.viewer.dnd.drawing.Size;
-import org.apache.isis.viewer.dnd.view.View;
-import org.apache.isis.viewer.dnd.view.ViewAreaType;
-import org.apache.isis.viewer.dnd.view.base.AbstractView;
-import org.apache.isis.viewer.dnd.view.content.NullContent;
-
-public class AbstractViewTest extends TestCase {
- private AbstractView av;
-
- public static void main(final String[] args) {
- junit.textui.TestRunner.run(AbstractViewTest.class);
- }
-
- @Override
- protected void setUp() throws Exception {
- av = new AbstractView(new NullContent()) {
- };
- super.setUp();
- }
-
- public void testBounds() {
- assertEquals(new Location(), av.getLocation());
- assertEquals(new Size(), av.getSize());
- assertEquals(new Bounds(), av.getBounds());
-
- av.setLocation(new Location(10, 20));
- assertEquals(new Location(10, 20), av.getLocation());
- assertEquals(new Size(), av.getSize());
- assertEquals(new Bounds(10, 20, 0, 0), av.getBounds());
-
- av.setSize(new Size(30, 40));
- assertEquals(new Location(10, 20), av.getLocation());
- assertEquals(new Size(30, 40), av.getSize());
- assertEquals(new Bounds(10, 20, 30, 40), av.getBounds());
-
- av.setBounds(new Bounds(new Location(50, 60), new Size(70, 80)));
- assertEquals(new Location(50, 60), av.getLocation());
- assertEquals(new Size(70, 80), av.getSize());
- assertEquals(new Bounds(50, 60, 70, 80), av.getBounds());
- }
-
- public void testPadding() {
- assertEquals(new Padding(0, 0, 0, 0), av.getPadding());
- }
-
- public void testViewAreaType() {
- final Location loc = new Location(10, 10);
- assertEquals(ViewAreaType.CONTENT, av.viewAreaType(loc));
- }
-
- public void testBoundsSetSizeAndLocation() throws Exception {
- final Location l = new Location();
- final Size z = new Size();
- final View view = new AbstractView(new NullContent()) {
- @Override
- public void setLocation(final Location location) {
- l.translate(location);
- }
-
- @Override
- public void setSize(final Size size) {
- z.extend(size);
- }
- };
-
- view.setBounds(new Bounds(20, 30, 40, 50));
- assertEquals(new Location(20, 30), l);
- assertEquals(new Size(40, 50), z);
- }
-
- public void testRequiredSizeIsLimitedToTheMaximumSize() throws Exception {
- assertEquals(Size.createMax(), av.getRequiredSize(Size.createMax()));
- assertEquals(new Size(100, 50), av.getRequiredSize(new Size(100, 50)));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/view/configurable/GridLayoutTest.java
----------------------------------------------------------------------
diff --git a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/view/configurable/GridLayoutTest.java b/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/view/configurable/GridLayoutTest.java
deleted file mode 100644
index 8a95369..0000000
--- a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/view/configurable/GridLayoutTest.java
+++ /dev/null
@@ -1,235 +0,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.viewer.dnd.viewer.view.configurable;
-
-import junit.framework.Assert;
-
-import org.jmock.Expectations;
-import org.jmock.auto.Mock;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
-import org.apache.isis.viewer.dnd.drawing.Location;
-import org.apache.isis.viewer.dnd.drawing.Size;
-import org.apache.isis.viewer.dnd.view.View;
-import org.apache.isis.viewer.dnd.view.composite.GridLayout;
-
-public class GridLayoutTest {
-
- @Rule
- public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
-
- @Rule
- public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
-
- private static final int CONTAINER_HEIGHT = 100;
- private static final int CONTAINER_WIDTH = 200;
-
- @Mock
- private View container;
-
- private int viewIndex = 1;
- private GridLayout layout;
-
- @Before
- public void setup() {
- layout = new GridLayout();
- }
-
- private void createContainer(final View[] views) {
- context.checking(new Expectations() {
- {
- allowing(container).getSubviews();
- will(returnValue(views));
- }
- });
- }
-
- private View createView(final int width, final int height) {
- final View subview = context.mock(View.class, "view" + viewIndex++);
- context.checking(new Expectations() {
- {
- allowing(subview).getRequiredSize(new Size(Integer.MAX_VALUE, Integer.MAX_VALUE));
- will(returnValue(new Size(width, height)));
- }
- });
- return subview;
- }
-
- private View createLayoutView(final int x, final int y, final int width, final int height) {
- final View view = context.mock(View.class, "view" + viewIndex++);
- context.checking(new Expectations() {
- {
- allowing(view).getRequiredSize(new Size(CONTAINER_WIDTH, CONTAINER_HEIGHT));
- will(returnValue(new Size(width, height)));
-
- one(view).setSize(new Size(width, height));
- one(view).setLocation(new Location(x, y));
- }
- });
- return view;
- }
-
-
- @Test
- public void noContentSize() {
- createContainer(new View[0]);
- Assert.assertEquals(new Size(), layout.getRequiredSize(container));
- }
-
- @Test
- public void sizeEqualToTheOnlySubview() {
- createContainer(new View[] { createView(20, 40) });
- Assert.assertEquals(new Size(20, 40), layout.getRequiredSize(container));
- }
-
- @Test
- public void positionVertically() {
- final View view1 = createLayoutView(0, 0, 20, 10);
- final View view2 = createLayoutView(0, 10, 20, 10);
- final View view3 = createLayoutView(0, 20, 20, 10);
- final View view4 = createLayoutView(0, 30, 20, 10);
- createContainer(new View[] { view1, view2, view3, view4 });
-
- layout.layout(container, new Size(CONTAINER_WIDTH, CONTAINER_HEIGHT));
- }
-
- @Test
- public void positionVerticallyOver2Colums() {
- final View view1 = createLayoutView(0, 0, 20, 10);
- final View view2 = createLayoutView(20, 0, 20, 10);
- final View view3 = createLayoutView(0, 10, 20, 10);
- final View view4 = createLayoutView(20, 10, 20, 10);
- final View view5 = createLayoutView(0, 20, 20, 10);
- createContainer(new View[] { view1, view2, view3, view4, view5 });
-
- layout.setOrientation(GridLayout.COLUMNS);
- layout.setSize(2);
- layout.layout(container, new Size(CONTAINER_WIDTH, CONTAINER_HEIGHT));
- }
-
- @Test
- public void positionVerticallyOver3Colums() {
- final View view1 = createLayoutView(0, 0, 20, 10);
- final View view2 = createLayoutView(20, 0, 20, 10);
- final View view3 = createLayoutView(40, 0, 20, 10);
- final View view4 = createLayoutView(0, 10, 20, 10);
- final View view5 = createLayoutView(20, 10, 20, 10);
- createContainer(new View[] { view1, view2, view3, view4, view5 });
-
- layout.setOrientation(GridLayout.COLUMNS);
- layout.setSize(3);
- layout.layout(container, new Size(CONTAINER_WIDTH, CONTAINER_HEIGHT));
- }
-
- @Test
- public void positionHorizontallyOver2Rows() {
- final View view1 = createLayoutView(0, 0, 20, 10);
- final View view2 = createLayoutView(0, 10, 20, 10);
- final View view3 = createLayoutView(20, 0, 20, 10);
- final View view4 = createLayoutView(20, 10, 20, 10);
- final View view5 = createLayoutView(40, 0, 20, 10);
- createContainer(new View[] { view1, view2, view3, view4, view5 });
-
- layout.setOrientation(GridLayout.ROWS);
- layout.setSize(2);
- layout.layout(container, new Size(CONTAINER_WIDTH, CONTAINER_HEIGHT));
- }
-
- @Test
- public void positionHorizontally() {
- final View view1 = createLayoutView(0, 0, 20, 10);
- final View view2 = createLayoutView(20, 0, 20, 10);
- final View view3 = createLayoutView(40, 0, 20, 10);
- final View view4 = createLayoutView(60, 0, 20, 10);
- createContainer(new View[] { view1, view2, view3, view4 });
-
- layout.setOrientation(GridLayout.ROWS);
- layout.layout(container, new Size(CONTAINER_WIDTH, CONTAINER_HEIGHT));
- }
-
- @Test
- public void heightSumOfTwoViews() {
- createContainer(new View[] { createView(10, 40), createView(10, 30) });
- Assert.assertEquals(70, layout.getRequiredSize(container).getHeight());
- }
-
- @Test
- public void widthSumOfTwoViews() {
- layout.setOrientation(GridLayout.ROWS);
- createContainer(new View[] { createView(20, 10), createView(30, 10) });
- Assert.assertEquals(50, layout.getRequiredSize(container).getWidth());
- }
-
- @Test
- public void widthMaxTwoViews() {
- createContainer(new View[] { createView(25, 10), createView(20, 10) });
- Assert.assertEquals(25, layout.getRequiredSize(container).getWidth());
- }
-
- @Test
- public void heightMaxOfTwoViews() {
- layout.setOrientation(GridLayout.ROWS);
- createContainer(new View[] { createView(10, 40), createView(10, 30) });
- Assert.assertEquals(40, layout.getRequiredSize(container).getHeight());
- }
-
- @Test
- public void sizeOver2Columns() {
- final View view1 = createView(30, 10);
- final View view2 = createView(20, 10);
- final View view3 = createView(20, 10);
- createContainer(new View[] { view1, view2, view3 });
-
- layout.setOrientation(GridLayout.COLUMNS);
- layout.setSize(2);
- Assert.assertEquals(new Size(50, 20), layout.getRequiredSize(container));
- }
-
- @Test
- public void sizeOver3Columns() {
- final View view1 = createView(30, 10);
- final View view2 = createView(20, 10);
- final View view3 = createView(20, 10);
- final View view4 = createView(40, 10);
- createContainer(new View[] { view1, view2, view3, view4 });
-
- layout.setOrientation(GridLayout.COLUMNS);
- layout.setSize(2);
- Assert.assertEquals(new Size(70, 20), layout.getRequiredSize(container));
- }
-
- @Test
- public void sizeOver2Rows() {
- final View view1 = createView(20, 10);
- final View view2 = createView(20, 10);
- final View view3 = createView(20, 10);
- createContainer(new View[] { view1, view2, view3 });
-
- layout.setOrientation(GridLayout.ROWS);
- layout.setSize(2);
- Assert.assertEquals(new Size(40, 20), layout.getRequiredSize(container));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/view/field/TextFieldBorderTest.java
----------------------------------------------------------------------
diff --git a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/view/field/TextFieldBorderTest.java b/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/view/field/TextFieldBorderTest.java
deleted file mode 100644
index f603301..0000000
--- a/component/viewer/dnd/impl/src/test/java/org/apache/isis/viewer/dnd/viewer/view/field/TextFieldBorderTest.java
+++ /dev/null
@@ -1,44 +0,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.viewer.dnd.viewer.view.field;
-
-import junit.framework.TestCase;
-
-import org.apache.isis.viewer.dnd.DummyView;
-import org.apache.isis.viewer.dnd.drawing.Padding;
-import org.apache.isis.viewer.dnd.field.TextFieldBorder;
-
-public class TextFieldBorderTest extends TestCase {
-
- public static void main(final String[] args) {
- junit.textui.TestRunner.run(TextFieldBorderTest.class);
- }
-
- @Override
- protected void setUp() throws Exception {
- org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.OFF);
- }
-
- public void testBorder() {
- final DummyView mockView = new DummyView();
- final TextFieldBorder border = new TextFieldBorder(mockView);
- assertEquals(new Padding(2, 2, 2, 2), border.getPadding());
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/dnd/pom.xml
----------------------------------------------------------------------
diff --git a/component/viewer/dnd/pom.xml b/component/viewer/dnd/pom.xml
deleted file mode 100644
index 8298265..0000000
--- a/component/viewer/dnd/pom.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis</artifactId>
- <version>1.6.0-SNAPSHOT</version>
- <relativePath>../../../core/pom.xml</relativePath>
- </parent>
-
- <groupId>org.apache.isis.viewer</groupId>
- <artifactId>isis-viewer-dnd</artifactId>
- <version>1.0.0-SNAPSHOT</version>
-
- <name>Isis Drag-n-Drop Viewer</name>
- <packaging>pom</packaging>
-
- <properties>
- <siteBaseDir>.</siteBaseDir>
- <relativeUrl/>
- </properties>
-
- <!-- used in Site generation for relative references. -->
- <url>http://isis.apache.org/${relativeUrl}</url>
-
- <build>
- <pluginManagement>
- <plugins>
- <!-- Apache Release Audit Tool -->
- <plugin>
- <groupId>org.apache.rat</groupId>
- <artifactId>apache-rat-plugin</artifactId>
- <version>0.10</version>
- <configuration>
- <excludes>
- <!--
- overriding inherited excludes from oia.core:isis
- with a more specific set for this component
- -->
- <exclude>**/target/**</exclude>
- <exclude>**/target-ide/**</exclude>
-
- <exclude>**/*.project</exclude>
- <exclude>**/.classpath</exclude>
- <exclude>**/.settings/**</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
-
- <dependencyManagement>
- <dependencies>
-
- <!-- for benefit of application developers, using scope=import -->
- <dependency>
- <groupId>org.apache.isis.viewer</groupId>
- <artifactId>isis-viewer-dnd-impl</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- </dependency>
-
- </dependencies>
- </dependencyManagement>
-
- <modules>
- <module>impl</module>
- </modules>
-
-</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/dnd/src/main/appended-resources/supplemental-models.xml
----------------------------------------------------------------------
diff --git a/component/viewer/dnd/src/main/appended-resources/supplemental-models.xml b/component/viewer/dnd/src/main/appended-resources/supplemental-models.xml
deleted file mode 100644
index ecd3906..0000000
--- a/component/viewer/dnd/src/main/appended-resources/supplemental-models.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 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. -->
-<supplementalDataModels xmlns="http://maven.apache.org/supplemental-model/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/supplemental-model/1.0.0 http://maven.apache.org/xsd/supplemental-model-1.0.0.xsd">
-
- <supplement>
- <project>
- <groupId>aopalliance</groupId>
- <artifactId>aopalliance</artifactId>
- <version>1.0</version>
- <licenses>
- <license>
- <name>Public Domain</name>
- </license>
- </licenses>
- </project>
- </supplement>
-
- <supplement>
- <!-- not quite sure why licenses:download-license flags this, since license info seems to be in its POM -->
- <project>
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-jodatime</artifactId>
- <version>3.1.1</version>
- <licenses>
- <license>
- <name>The Apache Software License, Version 2.0</name>
- <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
- </license>
- </licenses>
- </project>
- </supplement>
-
- <supplement>
- <project>
- <groupId>org.scannotation</groupId>
- <artifactId>scannotation</artifactId>
- <version>1.0.3</version>
- <licenses>
- <license>
- <name>The Apache Software License, Version 2.0</name>
- <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
- </project>
- </supplement>
-
- <supplement>
- <project>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- <version>1.6.1</version>
- <licenses>
- <license>
- <name>BSD License</name>
- <url>http://dom4j.sourceforge.net/dom4j-1.6.1/license.html</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
- </project>
- </supplement>
-
- <supplement>
- <project>
- <groupId>net.jcip</groupId>
- <artifactId>jcip-annotations</artifactId>
- <version>1.0</version>
- <licenses>
- <license>
- <name>Creative Commons Attribution 2.5 License</name>
- <url>http://creativecommons.org/licenses/by/2.5/</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
- </project>
- </supplement>
-
-
- <supplement>
- <project>
- <groupId>xalan</groupId>
- <artifactId>xalan</artifactId>
- <version>2.7.0</version>
- <licenses>
- <license>
- <name>The Apache Software License, Version 2.0</name>
- <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
- </project>
- </supplement>
-
-
-</supplementalDataModels>
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/dnd/tck/ide/eclipse/launch/viewer-dnd-tck.launch
----------------------------------------------------------------------
diff --git a/component/viewer/dnd/tck/ide/eclipse/launch/viewer-dnd-tck.launch b/component/viewer/dnd/tck/ide/eclipse/launch/viewer-dnd-tck.launch
deleted file mode 100644
index 51c74fc..0000000
--- a/component/viewer/dnd/tck/ide/eclipse/launch/viewer-dnd-tck.launch
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.apache.isis.runtimes.dflt.runtime/src/main/java/org/apache/isis/Isis.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<mapAttribute key="org.eclipse.debug.core.preferred_launchers">
-<mapEntry key="[debug]" value="org.eclipse.jdt.launching.localJavaApplication"/>
-<mapEntry key="[run]" value="org.eclipse.jdt.launching.localJavaApplication"/>
-</mapAttribute>
-<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
-<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.isis.Isis"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--type exploration --viewer dnd"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.apache.isis.viewer.dnd-tck"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
-</launchConfiguration>
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/dnd/tck/pom.xml
----------------------------------------------------------------------
diff --git a/component/viewer/dnd/tck/pom.xml b/component/viewer/dnd/tck/pom.xml
deleted file mode 100644
index 8a39f8d..0000000
--- a/component/viewer/dnd/tck/pom.xml
+++ /dev/null
@@ -1,154 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <!-- common use cases: -->
- <!-- mvn package : creates self-contained JAR -->
- <!-- mvn antrun:run -D exec=dnd : runs JAR using DnD viewer -->
-
- <parent>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-tck</artifactId>
- <version>1.6.0-SNAPSHOT</version>
- <relativePath>../../../../core/tck/pom.xml</relativePath>
- </parent>
-
- <groupId>org.apache.isis.viewer</groupId>
- <artifactId>isis-viewer-dnd-tck</artifactId>
- <name>Isis Drag-n-Drop Viewer TCK tests</name>
-
- <properties>
- <isis-viewer-dnd.version>1.0.0-SNAPSHOT</isis-viewer-dnd.version>
- <isis-objectstore-xml.version>1.0.0-SNAPSHOT</isis-objectstore-xml.version>
-
- <siteBaseDir>..</siteBaseDir>
- <relativeUrl>dnd-tck/</relativeUrl>
- <!-- until someone comes up with a better solution -->
- <distMgmtSiteUrl>file:///tmp/m2-sites/isis/viewer/dnd</distMgmtSiteUrl>
- </properties>
-
- <build>
- <plugins>
- <!-- mvn package -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
- <transformers>
- <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
- <mainClass>org.apache.isis.Isis</mainClass>
- </transformer>
- </transformers>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-tck-fixture</artifactId>
- </dependency>
-
- <!-- isis core -->
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-metamodel</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-bytecode-cglib</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-objectstore</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-profilestore</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-security</artifactId>
- </dependency>
-
-
- <!-- isis non-core components -->
- <dependency>
- <groupId>org.apache.isis.viewer</groupId>
- <artifactId>isis-viewer-dnd-impl</artifactId>
- <version>${isis-viewer-dnd.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.objectstore</groupId>
- <artifactId>isis-objectstore-xml</artifactId>
- <version>${isis-objectstore-xml.version}</version>
- </dependency>
-
- </dependencies>
-
- <profiles>
- <profile>
- <!-- prereqs: mvn package -->
- <!-- mvn antrun:run -D exec=dnd -->
- <id>exec-dnd</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- <property>
- <name>exec</name>
- <value>dnd</value>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <configuration>
- <tasks>
- <exec executable="java" failonerror="true">
- <arg value="-jar" />
- <arg value="${project.build.directory}/${project.build.finalName}.jar" />
- <arg value="-type" />
- <arg value="exploration" />
- <arg value="-viewer" />
- <arg value="dnd" />
- </exec>
- </tasks>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- </profiles>
-
-</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/dnd/tck/src/main/resources/isis.properties
----------------------------------------------------------------------
diff --git a/component/viewer/dnd/tck/src/main/resources/isis.properties b/component/viewer/dnd/tck/src/main/resources/isis.properties
deleted file mode 100644
index 7572b3b..0000000
--- a/component/viewer/dnd/tck/src/main/resources/isis.properties
+++ /dev/null
@@ -1,52 +0,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.
-isis.services.prefix = org.apache.isis.tck.objstore.dflt
-isis.services =\
- scalars.ApplibValuedEntityRepositoryDefault,\
- scalars.JdkValuedEntityRepositoryDefault,\
- scalars.PrimitiveValuedEntityRepositoryDefault,\
- scalars.WrapperValuedEntityRepositoryDefault, \
- simples.SimpleEntityRepositoryDefault,\
- assocs.ParentEntityRepositoryDefault
-
-isis.fixtures.prefix= org.apache.isis.tck.fixture
-isis.fixtures=\
- LogonAsSvenFixture,\
- scalars.ApplibValuedEntityFixture,\
- scalars.JdkValuedEntityFixture,\
- scalars.PrimitiveValuedEntityFixture,\
- scalars.WrapperValuedEntityFixture,\
- simples.SimpleEntityFixture,\
- assocs.ParentAndChildEntityFixture
-
-isis.exploration.users=sven, dick, bob
-
-isis.reflector.class-substitutor=org.apache.isis.runtimes.dflt.bytecode.dflt.classsubstitutor.CglibClassSubstitutor
-#isis.reflector.class-substitutor=org.apache.isis.runtimes.dflt.bytecode.javassist.classsubstitutor.JavassistClassSubstitutor
-#isis.reflector.class-substitutor=org.apache.isis.runtimes.dflt.bytecode.identity.classsubstitutor.ClassSubstitutorIdentity
-
-isis.persistor.object-factory=org.apache.isis.runtimes.dflt.bytecode.dflt.objectfactory.CglibObjectFactory
-#isis.persistor.object-factory=org.apache.isis.runtimes.dflt.bytecode.javassist.objectfactory.JavassistObjectFactory
-#isis.persistor.object-factory=org.apache.isis.runtimes.dflt.bytecode.identity.objectfactory.ObjectFactoryBasic
-
-
-isis.persistor.domain-object-container=org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault
-#isis.persistor.domain-object-container=org.apache.isis.progmodel.wrapper.metamodel.DomainObjectContainerWrapperFactory
-
-#isis.reflector.facets.include=org.apache.isis.runtimes.dflt.runtime.authorization.standard.AuthorizationFacetFactoryImpl
-#isis.authorization.learn=true
-
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/dnd/tck/src/main/resources/logging.properties
----------------------------------------------------------------------
diff --git a/component/viewer/dnd/tck/src/main/resources/logging.properties b/component/viewer/dnd/tck/src/main/resources/logging.properties
deleted file mode 100644
index f2d65e6..0000000
--- a/component/viewer/dnd/tck/src/main/resources/logging.properties
+++ /dev/null
@@ -1,30 +0,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.
-# apache's log4j is used to provide system logging.
-log4j.rootCategory=INFO, Console
-
-# The console appender
-log4j.appender.Console=org.apache.log4j.ConsoleAppender
-log4j.appender.Console.target=System.out
-log4j.appender.Console.layout=org.apache.log4j.PatternLayout
-log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} [%-20c{1} %-10t %-5p] %m%n
-
-log4j.appender.File=org.apache.log4j.RollingFileAppender
-log4j.appender.File.file=isis.log
-log4j.appender.File.append=false
-log4j.appender.File.layout=org.apache.log4j.PatternLayout
-log4j.appender.File.layout.ConversionPattern=%d [%-20c{1} %-10t %-5p] %m%n
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/junit/NOTICE
----------------------------------------------------------------------
diff --git a/component/viewer/junit/NOTICE b/component/viewer/junit/NOTICE
deleted file mode 100644
index ba21d0c..0000000
--- a/component/viewer/junit/NOTICE
+++ /dev/null
@@ -1,7 +0,0 @@
-Apache Isis
-Copyright 2010-2013 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/junit/impl/pom.xml
----------------------------------------------------------------------
diff --git a/component/viewer/junit/impl/pom.xml b/component/viewer/junit/impl/pom.xml
deleted file mode 100644
index f60859b..0000000
--- a/component/viewer/junit/impl/pom.xml
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.isis.viewer</groupId>
- <artifactId>isis-viewer-junit</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>isis-viewer-junit-impl</artifactId>
-
- <name>Isis JUnit Viewer Implementation</name>
-
- <properties>
- <siteBaseDir>..</siteBaseDir>
- <relativeUrl>impl</relativeUrl>
-
- <wrapper-progmodel.version>1.0.0-SNAPSHOT</wrapper-progmodel.version>
- </properties>
-
- <!-- used in Site generation for relative references. -->
- <url>http://isis.apache.org/${relativeUrl}</url>
-
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-project-info-reports-plugin</artifactId>
- <inherited>false</inherited>
- <configuration>
- <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
- </configuration>
- <reportSets>
- <reportSet>
- <inherited>false</inherited>
- <reports>
- <report>dependencies</report>
- <report>dependency-convergence</report>
- <report>plugins</report>
- <report>summary</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
- </plugins>
- </reporting>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-wrapper</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-bytecode-cglib</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-objectstore</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-profilestore</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-security</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-metamodel</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-metamodel</artifactId>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-runtime</artifactId>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
-
-
- <dependency>
- <groupId>asm</groupId>
- <artifactId>asm</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.objenesis</groupId>
- <artifactId>objenesis</artifactId>
- </dependency>
-
- <dependency>
- <groupId>cglib</groupId>
- <artifactId>cglib-nodep</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jmock</groupId>
- <artifactId>jmock</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jmock</groupId>
- <artifactId>jmock-junit4</artifactId>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
-
- </dependencies>
-
-</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/junit/impl/src/site/apt/index.apt
----------------------------------------------------------------------
diff --git a/component/viewer/junit/impl/src/site/apt/index.apt b/component/viewer/junit/impl/src/site/apt/index.apt
deleted file mode 100644
index 81c6822..0000000
--- a/component/viewer/junit/impl/src/site/apt/index.apt
+++ /dev/null
@@ -1,29 +0,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.
-
-
-
-JUnit Viewer
-
- The <junit> viewer module provides JUnit4 integration, allowing
- unit tests to be written exercising business
- rules by catching the exceptions thrown by proxied domain objects.
-
-Further Info
-
- See this module's {{{./apidocs/index.html}Javadoc}} and the {{{./docbkx/html/guide/isis-junit-support.html}user guide}} for more information.
-
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/junit/impl/src/site/apt/jottings.apt
----------------------------------------------------------------------
diff --git a/component/viewer/junit/impl/src/site/apt/jottings.apt b/component/viewer/junit/impl/src/site/apt/jottings.apt
deleted file mode 100644
index c5d1200..0000000
--- a/component/viewer/junit/impl/src/site/apt/jottings.apt
+++ /dev/null
@@ -1,24 +0,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.
-
-
-
-Jottings
-
- This page is to capture any random jottings relating to this module prior
- to being moved into formal documentation.
-
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/junit/impl/src/site/site.xml
----------------------------------------------------------------------
diff --git a/component/viewer/junit/impl/src/site/site.xml b/component/viewer/junit/impl/src/site/site.xml
deleted file mode 100644
index 2a0a2ee..0000000
--- a/component/viewer/junit/impl/src/site/site.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<project>
-
- <body>
- <breadcrumbs>
- <item name="JUnit"/>
- </breadcrumbs>
-
- <menu name="JUnit Support">
- <item name="About" href="index.html" />
- <item name="Jottings" href="jottings.html" />
- </menu>
-
- <menu name="Viewer Modules">
- <item name="HTML" href="../html/index.html" />
- <item name="Scimpi" href="../scimpi/index.html" />
- <item name="Wicket" href="../wicket/index.html" />
- <item name="RestfulObjects" href="../restfulobjects/index.html" />
- <item name="JUnit Support" href="../junit/index.html" />
- <item name="BDD Integration" href="../bdd/index.html" />
- <item name="DnD" href="../dnd/index.html" />
- </menu>
-
- <menu name="Documentation">
- <item name="${docbkxGuideTitle} (PDF)" href="docbkx/pdf/${docbkxGuideName}.pdf" />
- <item name="${docbkxGuideTitle} (HTML)" href="docbkx/html/guide/${docbkxGuideName}.html" />
- </menu>
-
- <menu name="Maven Reports" ref="reports" />
- </body>
-</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/680f0c8d/component/viewer/junit/impl/src/test/resources/isis.properties
----------------------------------------------------------------------
diff --git a/component/viewer/junit/impl/src/test/resources/isis.properties b/component/viewer/junit/impl/src/test/resources/isis.properties
deleted file mode 100644
index e36e9dd..0000000
--- a/component/viewer/junit/impl/src/test/resources/isis.properties
+++ /dev/null
@@ -1,25 +0,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.
-#isis.reflector.class-substitutor=org.apache.isis.runtimes.dflt.bytecode.dflt.classsubstitutor.CglibClassSubstitutor
-#isis.reflector.class-substitutor=org.apache.isis.runtimes.dflt.bytecode.javassist.classsubstitutor.JavassistClassSubstitutor
-isis.reflector.class-substitutor=org.apache.isis.runtimes.dflt.bytecode.identity.classsubstitutor.ClassSubstitutorIdentity
-
-#isis.persistor.object-factory=org.apache.isis.runtimes.dflt.bytecode.dflt.objectfactory.CglibObjectFactory
-#isis.persistor.object-factory=org.apache.isis.runtimes.dflt.bytecode.javassist.objectfactory.JavassistObjectFactory
-isis.persistor.object-factory=org.apache.isis.runtimes.dflt.bytecode.identity.objectfactory.ObjectFactoryBasic
-
-