Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Deleted

  • Loading branch information...
commit 1a043f41203c4696fc41340e0f332c6f52e0eb6f 1 parent 01c7535
InterCommIT authored
Showing with 0 additions and 942 deletions.
  1. +0 −39 src/test/java/nl/intercommit/tapestry/TestConfirm.java
  2. +0 −47 src/test/java/nl/intercommit/tapestry/TestDropDownMenu.java
  3. +0 −50 src/test/java/nl/intercommit/tapestry/TestEditableSelect.java
  4. +0 −39 src/test/java/nl/intercommit/tapestry/TestHoverlink.java
  5. +0 −41 src/test/java/nl/intercommit/tapestry/TestModalBox.java
  6. +0 −45 src/test/java/nl/intercommit/tapestry/TestPagedGrid.java
  7. +0 −44 src/test/java/nl/intercommit/tapestry/TestPopupWindow.java
  8. +0 −56 src/test/java/nl/intercommit/tapestry/TestSwitch.java
  9. +0 −42 src/test/java/nl/intercommit/tapestry/TestTextMarker.java
  10. +0 −16 src/test/java/nl/intercommit/tapestry/grid/TestCollectionFilter.java
  11. +0 −104 src/test/java/nl/intercommit/tapestry/grid/TestGridSourceFilter.java
  12. +0 −21 src/test/java/nl/intercommit/tapestry/test/beans/Box.java
  13. +0 −33 src/test/java/nl/intercommit/tapestry/test/entities/Person.java
  14. +0 −5 src/test/java/nl/intercommit/tapestry/test/pages/ConfirmPage.java
  15. +0 −56 src/test/java/nl/intercommit/tapestry/test/pages/DropDownMenuPage.java
  16. +0 −21 src/test/java/nl/intercommit/tapestry/test/pages/EditableSelectPage.java
  17. +0 −15 src/test/java/nl/intercommit/tapestry/test/pages/HoverLinkPage.java
  18. +0 −15 src/test/java/nl/intercommit/tapestry/test/pages/ModalBoxPage.java
  19. +0 −51 src/test/java/nl/intercommit/tapestry/test/pages/PagedGridPage.java
  20. +0 −12 src/test/java/nl/intercommit/tapestry/test/pages/PopupWindowPage.java
  21. +0 −18 src/test/java/nl/intercommit/tapestry/test/pages/SwitchPage.java
  22. +0 −21 src/test/java/nl/intercommit/tapestry/test/pages/TextMarkerPage.java
  23. +0 −30 src/test/java/nl/intercommit/tapestry/test/services/InterCommitTestModule.java
  24. +0 −27 src/test/java/nl/intercommit/tapestry/util/TestHoverlinkStreamResponse.java
  25. +0 −10 src/test/resources/nl/intercommit/tapestry/test/pages/ConfirmPage.tml
  26. +0 −7 src/test/resources/nl/intercommit/tapestry/test/pages/DropDownMenuPage.tml
  27. +0 −16 src/test/resources/nl/intercommit/tapestry/test/pages/EditableSelectPage.tml
  28. +0 −5 src/test/resources/nl/intercommit/tapestry/test/pages/HoverLinkPage.tml
  29. +0 −13 src/test/resources/nl/intercommit/tapestry/test/pages/ModalBoxPage.tml
  30. +0 −11 src/test/resources/nl/intercommit/tapestry/test/pages/PagedGridPage.tml
  31. +0 −7 src/test/resources/nl/intercommit/tapestry/test/pages/PopupWindowPage.tml
  32. +0 −19 src/test/resources/nl/intercommit/tapestry/test/pages/SwitchPage.tml
  33. +0 −6 src/test/resources/nl/intercommit/tapestry/test/pages/TextMarkerPage.tml
39 src/test/java/nl/intercommit/tapestry/TestConfirm.java
View
@@ -1,39 +0,0 @@
-package nl.intercommit.tapestry;
-
-import junit.framework.TestCase;
-
-import org.apache.tapestry5.test.PageTester;
-
-public class TestConfirm extends TestCase {
-
- private PageTester tester;
-
- @Override
- protected void setUp() throws Exception {
- if (tester == null) {
- tester = new PageTester("nl.intercommit.tapestry.test", "InterCommitTest");
- }
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- if (tester != null) {
- tester.shutdown();
- }
- }
-
- public void testConfirmationPopup() {
- org.apache.tapestry5.dom.Document dom = tester.renderPage("ConfirmPage");
- assertNotNull(dom);
- assertNull(dom.getElementById("t-error"));
- assertFalse(dom.toString().contains("<h1 class=\"t-exception-report\">"));
-
- System.err.println(dom);
-
- assertNotNull(dom.getElementById("actionlink"));
- assertTrue(dom.toString().contains("new Confirm('actionlink', 'Are you sure?')"));
- }
-
-
-}
47 src/test/java/nl/intercommit/tapestry/TestDropDownMenu.java
View
@@ -1,47 +0,0 @@
-package nl.intercommit.tapestry;
-
-import junit.framework.TestCase;
-
-import org.apache.tapestry5.test.PageTester;
-
-public class TestDropDownMenu extends TestCase {
-
- private PageTester tester;
-
- @Override
- protected void setUp() throws Exception {
- if (tester == null) {
- tester = new PageTester("nl.intercommit.tapestry.test", "InterCommitTest");
- }
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- if (tester != null) {
- tester.shutdown();
- }
- }
-
- public void testEmptyMenu() {
- org.apache.tapestry5.dom.Document dom = tester.renderPage("DropDownMenuPage");
-
- assertNull(dom.getElementById("t-error"));
- assertNotNull(dom.getElementById("root"));
-
- assertEquals("<ul id=\"root\" class=\"level1\"></ul>",dom.getElementById("root").toString().trim());
-
- }
-
-
- public void testFullMenu() {
-
- org.apache.tapestry5.dom.Document dom = tester.renderPage("DropDownMenuPage/full");
-
- assertNotNull(dom.getElementById("root"));
-
- assertEquals("<ul id=\"root\" class=\"level1\"><li id=\"none\"><a href=\"/foo/pagedgridpage\"><div style=\"display:inline; margin-right: 5px;\"><img src=\"/images/menu1.png\"/></div>top1</a><ul class=\"level2\"><li><a href=\"/foo/dropdownmenupage\">item1</a></li><li><a href=\"/foo/dropdownmenupage\">item2</a></li></ul></li><li id=\"none\"><a href=\"/foo/switchpage\">top2</a><ul class=\"level2\"><li><a href=\"/foo/dropdownmenupage\">item1</a></li><li><a href=\"/foo/dropdownmenupage\">item2<div class=\"morelevels\"> &gt; </div></a><ul class=\"level3\"><li><a href=\"/foo/dropdownmenupage\">sub1</a></li><li><a href=\"/foo/dropdownmenupage\">sub2</a></li><li><a href=\"/foo/dropdownmenupage\">sub3</a></li></ul></li></ul></li></ul>",dom.getElementById("root").toString());
-
- }
-
-}
50 src/test/java/nl/intercommit/tapestry/TestEditableSelect.java
View
@@ -1,50 +0,0 @@
-package nl.intercommit.tapestry;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.apache.tapestry5.internal.test.TestableResponse;
-import org.apache.tapestry5.test.PageTester;
-
-public class TestEditableSelect extends TestCase {
-
- private PageTester tester;
-
- @Override
- protected void setUp() throws Exception {
- if (tester == null) {
- tester = new PageTester("nl.intercommit.tapestry.test", "InterCommitTest");
- }
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- if (tester != null) {
- tester.shutdown();
- }
- }
-
- public void testConfirmationPopup() {
- org.apache.tapestry5.dom.Document dom = tester.renderPage("EditableSelectPage");
- assertNotNull(dom);
- assertNull(dom.getElementById("t-error"));
- assertFalse(dom.toString().contains("<h1 class=\"t-exception-report\">"));
-
- assertNotNull(dom.getElementById("editableselectbox"));
-
- assertEquals("off",dom.getElementById("editableselectbox").getAttribute("autocomplete"));
-
- Map<String, String > params = new HashMap<String, String>();
- params.put(dom.getElementById("editableselectbox").getAttribute("id"), "test");
-
- TestableResponse resp = tester.submitFormAndReturnResponse(dom.getElementById("form"),params);
-
- assertEquals(200,resp.getStatus());
-
- }
-
-
-}
39 src/test/java/nl/intercommit/tapestry/TestHoverlink.java
View
@@ -1,39 +0,0 @@
-package nl.intercommit.tapestry;
-
-import junit.framework.TestCase;
-
-import org.apache.tapestry5.test.PageTester;
-
-public class TestHoverlink extends TestCase {
-
- private PageTester tester;
-
- @Override
- protected void setUp() throws Exception {
- if (tester == null) {
- tester = new PageTester("nl.intercommit.tapestry.test", "InterCommitTest");
- }
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- if (tester != null) {
- tester.shutdown();
- }
- }
-
-
- public void testHoverLinkComponent() {
- org.apache.tapestry5.dom.Document dom = tester.renderPage("HoverlinkPage");
-
- assertNotNull(dom);
- assertNotNull(dom.getElementById("hoverlink"));
-
- assertTrue(dom.getElementById("hoverlink").toString().equals("<a onclick=\"return false;\" class=\"ic_t5-hoverlink\" id=\"hoverlink\" href=\"#\">consectetur</a>"));
- assertTrue(dom.toString().contains("\"dataURL\":\"http://localhost/foo/hoverlinkpage.hoverlink:retrievecontent\""));
-
- }
-
-
-}
41 src/test/java/nl/intercommit/tapestry/TestModalBox.java
View
@@ -1,41 +0,0 @@
-package nl.intercommit.tapestry;
-
-import junit.framework.TestCase;
-
-import org.apache.tapestry5.test.PageTester;
-
-public class TestModalBox extends TestCase {
-
- private PageTester tester;
-
- @Override
- protected void setUp() throws Exception {
- if (tester == null) {
- tester = new PageTester("nl.intercommit.tapestry.test", "InterCommitTest");
- }
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- if (tester != null) {
- tester.shutdown();
- }
- }
-
-
- public void testModalBox() {
- org.apache.tapestry5.dom.Document dom = tester.renderPage("ModalBoxPage");
-
- System.err.println(dom);
-
- assertNotNull(dom);
- assertNull(dom.getElementById("t-error"));
- assertFalse(dom.toString().contains("<h1 class=\"t-exception-report\">"));
-
- assertTrue(dom.getElementById("modalbox")!=null);
-
- }
-
-
-}
45 src/test/java/nl/intercommit/tapestry/TestPagedGrid.java
View
@@ -1,45 +0,0 @@
-package nl.intercommit.tapestry;
-
-import junit.framework.TestCase;
-
-import org.apache.tapestry5.dom.Element;
-import org.apache.tapestry5.test.PageTester;
-
-public class TestPagedGrid extends TestCase {
-
- private PageTester tester;
-
- @Override
- protected void setUp() throws Exception {
- if (tester == null) {
- tester = new PageTester("nl.intercommit.tapestry.test", "InterCommitTest");
- }
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- if (tester != null) {
- tester.shutdown();
- }
- }
-
-
- public void testPagedGrids() {
-
- org.apache.tapestry5.dom.Document dom = tester.renderPage("PagedGridPage");
-
- assertNotNull(dom);
-
- Element el = dom.find("html/body/h1");
- if (el != null) {
- if (el.getAttribute("class").equals("t-exception-report")) {
- fail("Tapestry Exception:" + dom);
- }
- }
- }
-
-
-
-
-}
44 src/test/java/nl/intercommit/tapestry/TestPopupWindow.java
View
@@ -1,44 +0,0 @@
-package nl.intercommit.tapestry;
-
-import junit.framework.TestCase;
-
-import org.apache.tapestry5.dom.Element;
-import org.apache.tapestry5.test.PageTester;
-
-public class TestPopupWindow extends TestCase {
-
- private PageTester tester;
-
- @Override
- protected void setUp() throws Exception {
- if (tester == null) {
- tester = new PageTester("nl.intercommit.tapestry.test", "InterCommitTest");
- }
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- if (tester != null) {
- tester.shutdown();
- }
- }
-
-
- public void testPopupWindow() {
-
- org.apache.tapestry5.dom.Document dom = tester.renderPage("PopupWindowPage");
- Element el = dom.find("html/body/h1");
- if (el != null) {
- if (el.getAttribute("class").equals("t-exception-report")) {
- fail("Tapestry Exception:" + dom);
- }
- }
-
- assertNotNull(dom.getElementById("pw_popupWindowContent"));
- }
-
-
-
-
-}
56 src/test/java/nl/intercommit/tapestry/TestSwitch.java
View
@@ -1,56 +0,0 @@
-package nl.intercommit.tapestry;
-
-import junit.framework.TestCase;
-
-import org.apache.tapestry5.dom.Element;
-import org.apache.tapestry5.test.PageTester;
-
-public class TestSwitch extends TestCase {
-
- private PageTester tester;
-
- @Override
- protected void setUp() throws Exception {
- if (tester == null) {
- tester = new PageTester("nl.intercommit.tapestry.test", "InterCommitTest");
- }
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- if (tester != null) {
- tester.shutdown();
- }
- }
-
-
- public void testSwitchComponent() {
-
- org.apache.tapestry5.dom.Document dom = tester.renderPage("SwitchPage/one");
- assertNotNull(dom.getElementById("switch"));
- Element el = dom.getElementById("switch");
- assertEquals("one!",el.getChildMarkup().trim());
-
-
- dom = tester.renderPage("SwitchPage/unknown");
- assertNotNull(dom.getElementById("switch"));
- el = dom.getElementById("switch");
- assertEquals("<h1>default</h1>",el.getChildMarkup().trim());
-
-
- dom = tester.renderPage("SwitchPage/someother");
- assertNotNull(dom.getElementById("switch"));
- el = dom.getElementById("switch");
- assertEquals("someother...",el.getChildMarkup().trim());
-
- dom = tester.renderPage("SwitchPage");
- assertNotNull(dom.getElementById("switch"));
- el = dom.getElementById("switch");
- assertEquals("<h1>default</h1>",el.getChildMarkup().trim());
- }
-
-
-
-
-}
42 src/test/java/nl/intercommit/tapestry/TestTextMarker.java
View
@@ -1,42 +0,0 @@
-package nl.intercommit.tapestry;
-
-import junit.framework.TestCase;
-
-import org.apache.tapestry5.test.PageTester;
-
-public class TestTextMarker extends TestCase {
-
- private PageTester tester;
-
- @Override
- protected void setUp() throws Exception {
- if (tester == null) {
- tester = new PageTester("nl.intercommit.tapestry.test", "InterCommitTest");
- }
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- if (tester != null) {
- tester.shutdown();
- }
- }
-
-
- public void testTextMarkerComponent() {
-
- org.apache.tapestry5.dom.Document dom = tester.renderPage("TextMarkerPage");
- assertNotNull(dom.getElementById("result"));
- assertEquals("<div class=\"textmarker\">Lorem <div class=\"highlight\">ipsum</div> dolor sit amet...<div class=\"highlight\">Ut</div> labore et dolo...<div class=\"highlight\">Ut</div> enim ad minim ...<div class=\"highlight\">exercitation</div> ullamco labori...<div class=\"highlight\">ut</div> aliquip ex ea ...<div class=\"highlight\">ut</div>e irure dolor i...</div>",dom.getElementById("result").getChildMarkup());
- }
-
- public void testTextMarkerComponentMaxLength() {
-
- org.apache.tapestry5.dom.Document dom = tester.renderPage("TextMarkerPage/30");
- assertNotNull(dom.getElementById("result"));
- assertEquals("<div class=\"textmarker\">Lorem <div class=\"highlight\">ipsum</div> dolor sit amet...<div class=\"highlight\">Ut</div></div>",dom.getElementById("result").getChildMarkup());
- }
-
-
-}
16 src/test/java/nl/intercommit/tapestry/grid/TestCollectionFilter.java
View
@@ -1,16 +0,0 @@
-package nl.intercommit.tapestry.grid;
-
-import nl.intercommit.weaves.grid.CollectionFilter;
-import nl.intercommit.weaves.grid.CollectionFilter.OPERATOR;
-import junit.framework.TestCase;
-
-public class TestCollectionFilter extends TestCase {
-
- public void testFilter() {
- CollectionFilter cf = new CollectionFilter("name","Smith",OPERATOR.EQ);
-
- assertTrue(cf.getValue().equals("Smith"));
- assertTrue(cf.getOp().equals(OPERATOR.EQ));
- assertTrue(cf.getName().equals("name"));
- }
-}
104 src/test/java/nl/intercommit/tapestry/grid/TestGridSourceFilter.java
View
@@ -1,104 +0,0 @@
-package nl.intercommit.tapestry.grid;
-
-import java.util.Collection;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.apache.tapestry5.beaneditor.PropertyModel;
-import org.apache.tapestry5.grid.ColumnSort;
-import org.apache.tapestry5.grid.SortConstraint;
-import org.apache.tapestry5.internal.beaneditor.PropertyModelImpl;
-import org.hibernate.Criteria;
-import org.hibernate.Session;
-import org.hibernate.criterion.Restrictions;
-
-import nl.intercommit.tapestry.test.entities.Person;
-import nl.intercommit.weaves.grid.CollectionFilter;
-import nl.intercommit.weaves.grid.CollectionPagedGridDataSource;
-import nl.intercommit.weaves.grid.HibernatePagedGridDataSource;
-import nl.intercommit.weaves.grid.CollectionFilter.OPERATOR;
-import util.HibernateUtil;
-import junit.framework.TestCase;
-
-public class TestGridSourceFilter extends TestCase {
-
- HibernateUtil util = null;
- Session session = null;
- Collection<Person> persons = new LinkedList<Person>();
-
- @Override
- protected void setUp() throws Exception {
- util = new HibernateUtil();
-
- session = util.create();
-
- Person p1 = new Person();
- p1.setName("fred");
- session.persist(p1);
- persons.add(p1);
-
- Person p2 = new Person();
- p2.setName("wilma");
- session.persist(p2);
- persons.add(p2);
-
- session.flush();
-
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- util.shutdown();
- }
-
-
- public void testHibernateGridSource() {
- HibernatePagedGridDataSource hpds = new HibernatePagedGridDataSource(session,Person.class) {
-
- @Override
- public void applyFiltering(Criteria criteria) {
- criteria.add(Restrictions.eq("name", "fred"));
- }
- };
-
- hpds.prepare(0, 10, new LinkedList<SortConstraint>());
-
- Person p1 = (Person)(hpds.getRowValue(0));
- assertNotNull(p1);
- assertEquals("fred", p1.getName());
-
- assertNotNull(hpds.getIdentifierForRowValue(p1));
- }
-
- public void testCollectionGridSource() {
- CollectionPagedGridDataSource cpds = new CollectionPagedGridDataSource(persons,Person.class) {
-
- @Override
- public List<CollectionFilter> createFilter() {
- List<CollectionFilter> list = new LinkedList<CollectionFilter>();
-
- CollectionFilter cf = new CollectionFilter("name","fred",OPERATOR.EQ);
- list.add(cf);
- return list;
- }
- };
-
- cpds.prepare(0,10,new LinkedList<SortConstraint>());
-
- Person p1 = (Person)(cpds.getRowValue(1));
-
- assertNull(p1); // it only contains fred..
-
- p1 = (Person)(cpds.getRowValue(0));
-
- assertEquals("fred",p1.getName());
-
-
-
- }
-
-
-}
-
-
21 src/test/java/nl/intercommit/tapestry/test/beans/Box.java
View
@@ -1,21 +0,0 @@
-package nl.intercommit.tapestry.test.beans;
-
-public class Box {
-
- private Long id;
- private String type;
- public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
- public String getType() {
- return type;
- }
- public void setType(String type) {
- this.type = type;
- }
-
-
-}
33 src/test/java/nl/intercommit/tapestry/test/entities/Person.java
View
@@ -1,33 +0,0 @@
-package nl.intercommit.tapestry.test.entities;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-
-@Entity
-public class Person {
-
- @Id
- @GeneratedValue
- private Long id;
-
- private String name;
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
-
-}
5 src/test/java/nl/intercommit/tapestry/test/pages/ConfirmPage.java
View
@@ -1,5 +0,0 @@
-package nl.intercommit.tapestry.test.pages;
-
-public class ConfirmPage {
-
-}
56 src/test/java/nl/intercommit/tapestry/test/pages/DropDownMenuPage.java
View
@@ -1,56 +0,0 @@
-package nl.intercommit.tapestry.test.pages;
-
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import nl.intercommit.weaves.menu.MenuItem;
-
-import org.apache.tapestry5.ioc.annotations.Inject;
-import org.apache.tapestry5.services.PageRenderLinkSource;
-
-public class DropDownMenuPage {
-
- private String menutype;
-
- @Inject
- private PageRenderLinkSource prls;
-
- private void onActivate(String menutype) {
- this.menutype = menutype;
- }
-
-
-
-
-
- public Map<MenuItem,Map<MenuItem, List<MenuItem>>> getMenu() {
-
- Map menu = new LinkedHashMap<MenuItem,Map<MenuItem, List<MenuItem>>>();
-
- if ("full".equals(menutype)) {
-
-
-
- Map<MenuItem,List<MenuItem>> level1 = new LinkedHashMap<MenuItem, List<MenuItem>>();
-
- level1.put(new MenuItem("item1",prls.createPageRenderLink("DropDownMenuPage")), null);
- level1.put(new MenuItem("item2",prls.createPageRenderLink("DropDownMenuPage")), null);
-
- menu.put(new MenuItem("/images/menu1.png","top1",prls.createPageRenderLink("PagedGridPage")),level1);
-
- List<MenuItem> submenu = new ArrayList<MenuItem>();
- submenu.add(new MenuItem("sub1",prls.createPageRenderLink("DropDownMenuPage")));
- submenu.add(new MenuItem("sub2",prls.createPageRenderLink("DropDownMenuPage")));
- submenu.add(new MenuItem("sub3",prls.createPageRenderLink("DropDownMenuPage")));
-
- Map<MenuItem,List<MenuItem>> level2 = new LinkedHashMap<MenuItem, List<MenuItem>>();
- level2.put(new MenuItem("item1",prls.createPageRenderLink("DropDownMenuPage")), null);
- level2.put(new MenuItem("item2",prls.createPageRenderLink("DropDownMenuPage")), submenu);
-
- menu.put(new MenuItem("top2",prls.createPageRenderLink("SwitchPage")),level2);
- }
- return menu;
- }
-}
21 src/test/java/nl/intercommit/tapestry/test/pages/EditableSelectPage.java
View
@@ -1,21 +0,0 @@
-package nl.intercommit.tapestry.test.pages;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.apache.tapestry5.annotations.Property;
-
-public class EditableSelectPage {
-
- @Property
- private String item;
-
- public List<String> getList() {
- List<String> items = new LinkedList<String>();
- items.add("psp");
- items.add("ipad");
- items.add("3ds");
- return items;
-
- }
-}
15 src/test/java/nl/intercommit/tapestry/test/pages/HoverLinkPage.java
View
@@ -1,15 +0,0 @@
-package nl.intercommit.tapestry.test.pages;
-
-import nl.intercommit.weaves.components.HoverLink;
-import nl.intercommit.weaves.util.HoverlinkStreamResponse;
-
-import org.apache.tapestry5.StreamResponse;
-import org.apache.tapestry5.annotations.OnEvent;
-
-public class HoverLinkPage {
-
- @OnEvent(component="hoverlink",value=HoverLink.RETRIEVE_CONTENT_EVENT)
- private StreamResponse returnContent1() {
- return new HoverlinkStreamResponse("Popup Title","Popup test content");
- }
-}
15 src/test/java/nl/intercommit/tapestry/test/pages/ModalBoxPage.java
View
@@ -1,15 +0,0 @@
-package nl.intercommit.tapestry.test.pages;
-
-import org.apache.tapestry5.Block;
-import org.apache.tapestry5.ioc.annotations.Inject;
-
-public class ModalBoxPage {
-
- @Inject
- private Block messageBlock;
-
- public Object onEvent() {
- return messageBlock;
- }
-
-}
51 src/test/java/nl/intercommit/tapestry/test/pages/PagedGridPage.java
View
@@ -1,51 +0,0 @@
-package nl.intercommit.tapestry.test.pages;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.apache.tapestry5.ioc.annotations.Inject;
-
-import nl.intercommit.tapestry.test.beans.Box;
-import nl.intercommit.tapestry.test.entities.Person;
-import nl.intercommit.weaves.grid.CollectionPagedGridDataSource;
-import nl.intercommit.weaves.grid.HibernatePagedGridDataSource;
-import nl.intercommit.weaves.hibernate.HibernateMultiSessionManager;
-
-public class PagedGridPage {
-
- @Inject
- private HibernateMultiSessionManager manager;
-
-
- public CollectionPagedGridDataSource getCollectionPagedSource() {
- List<Box> boxes = new LinkedList<Box>();
-
- Box box = new Box();
- box.setId(Long.valueOf(1));
- box.setType("type 1");
- boxes.add(box);
-
- box = new Box();
- box.setId(Long.valueOf(2));
- box.setType("type 2");
- boxes.add(box);
-
- return new CollectionPagedGridDataSource(boxes,Box.class);
- }
-
- public HibernatePagedGridDataSource getHibernatePagedSource() {
- return new HibernatePagedGridDataSource(manager.getSession("Factory1"),Person.class);
- }
-
- public List<Long> getPagination() {
- ArrayList<Long> list = new ArrayList<Long>();
- list.add(new Long(1));
- list.add(new Long(2));
- list.add(new Long(10));
- return list;
- }
-
-
-
-}
12 src/test/java/nl/intercommit/tapestry/test/pages/PopupWindowPage.java
View
@@ -1,12 +0,0 @@
-package nl.intercommit.tapestry.test.pages;
-
-import nl.intercommit.weaves.components.PopupWindow;
-
-import org.apache.tapestry5.annotations.Component;
-
-public class PopupWindowPage {
-
- @Component(parameters={"width=200","height=200","windowStyle=darkX"})
- private PopupWindow popupWindow;
-
-}
18 src/test/java/nl/intercommit/tapestry/test/pages/SwitchPage.java
View
@@ -1,18 +0,0 @@
-package nl.intercommit.tapestry.test.pages;
-
-public class SwitchPage {
-
- private String testValue;
-
- public String getTestValue() {
- return testValue;
- }
-
- public String getHtml() {
- return "<h1>default</h1>";
- }
-
- private void onActivate(String param) {
- testValue = param;
- }
-}
21 src/test/java/nl/intercommit/tapestry/test/pages/TextMarkerPage.java
View
@@ -1,21 +0,0 @@
-package nl.intercommit.tapestry.test.pages;
-
-import org.apache.tapestry5.annotations.Property;
-
-public class TextMarkerPage {
-
- @Property
- private int maxLength;
-
- public String getMessage() {
- return "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt Ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
- }
-
- public String[] getWords() {
- return new String[] {"ipsum","Ut","exercitation"};
- }
-
- private void onActivate(String param) {
- maxLength = Integer.parseInt(param);
- }
-}
30 src/test/java/nl/intercommit/tapestry/test/services/InterCommitTestModule.java
View
@@ -1,30 +0,0 @@
-package nl.intercommit.tapestry.test.services;
-
-import java.io.File;
-
-import nl.intercommit.weaves.hibernate.SessionFactoryConfiguration;
-
-import org.apache.tapestry5.ioc.Configuration;
-import org.apache.tapestry5.ioc.MappedConfiguration;
-import org.apache.tapestry5.ioc.internal.util.TapestryException;
-import org.apache.tapestry5.services.LibraryMapping;
-
-public class InterCommitTestModule {
-
- public static void contributeComponentClassResolver(
- Configuration configuration) {
- configuration.add(new LibraryMapping("ic-t5", "nl.intercommit.tapestry"));
- }
-
- public void contributeSessionFactorySource(MappedConfiguration<String,SessionFactoryConfiguration> configuration) {
- try {
- final File configFile = new File(this.getClass().getResource("/factory1.cfg.xml").toURI());
- final SessionFactoryConfiguration factory1Config = new SessionFactoryConfiguration(new String[] {"nl.intercommit.tapestry.test.entities"},configFile);
- configuration.add("Factory1",factory1Config);
- } catch (Exception e) {
- e.printStackTrace();
- throw new TapestryException("Could not initialize session factory due to: ["+e.getMessage()+"]",e);
- }
- }
-
-}
27 src/test/java/nl/intercommit/tapestry/util/TestHoverlinkStreamResponse.java
View
@@ -1,27 +0,0 @@
-package nl.intercommit.tapestry.util;
-
-import java.io.IOException;
-
-import junit.framework.TestCase;
-
-import nl.intercommit.weaves.util.HoverlinkStreamResponse;
-
-import org.apache.commons.io.IOUtils;
-
-public class TestHoverlinkStreamResponse extends TestCase {
-
- public void testContent() {
- HoverlinkStreamResponse hsr = new HoverlinkStreamResponse("Test title","<html><body>And some comment</body></html");
-
- try {
- final String output = new String(IOUtils.toByteArray(hsr.getStream()));
-
- assertEquals("<HelpBalloon><title>Test title</title><content>&#60;html&#62;&#60;body&#62;And some comment&#60;/body&#62;&#60;/html</content></HelpBalloon>",output);
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- fail();
- }
-
- }
-}
10 src/test/resources/nl/intercommit/tapestry/test/pages/ConfirmPage.tml
View
@@ -1,10 +0,0 @@
-<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"
- xmlns:p="tapestry:parameter">
-
-
-
- <h4>Confirmation dialog page </h4>
- <p/>
-
- <t:actionlink page="confirmpage" t:mixins="ic-t5/Confirm">click here</t:actionlink>
-</html>
7 src/test/resources/nl/intercommit/tapestry/test/pages/DropDownMenuPage.tml
View
@@ -1,7 +0,0 @@
-<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"
- xmlns:p="tapestry:parameter">
-
- <t:ic-t5.DropDownMenu menu="menu">
- </t:ic-t5.DropDownMenu>
-
-</html>
16 src/test/resources/nl/intercommit/tapestry/test/pages/EditableSelectPage.tml
View
@@ -1,16 +0,0 @@
-<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"
- xmlns:p="tapestry:parameter">
-
-
-
- <h4>Editable select page </h4>
- <p/>
-
- <t:form t:id="form">
- <t:errors/>
- <t:ic-t5.EditableSelectBox items="list" value="item"/>
-
- <t:submit/>
-
- </t:form>
-</html>
5 src/test/resources/nl/intercommit/tapestry/test/pages/HoverLinkPage.tml
View
@@ -1,5 +0,0 @@
-<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"
- xmlns:p="tapestry:parameter">
-
- Lorem ipsum dolor sit amet, <t:ic-t5.HoverLink>consectetur</t:ic-t5.HoverLink> adipisicing elit, sed do eiusmod tempor incididunt Ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-</html>
13 src/test/resources/nl/intercommit/tapestry/test/pages/ModalBoxPage.tml
View
@@ -1,13 +0,0 @@
-<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"
- xmlns:p="tapestry:parameter">
-
-
- <h4>ModalBox page </h4>
- <p/>
-
- <t:ic-t5.ModalBox t:type='event'>Click To See Inline Modal Box</t:ic-t5.ModalBox>
-
- <t:block t:id='messageBlock'>
- This is a simple Message
- </t:block>
-</html>
11 src/test/resources/nl/intercommit/tapestry/test/pages/PagedGridPage.tml
View
@@ -1,11 +0,0 @@
-<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"
- xmlns:p="tapestry:parameter">
-
- <t:ic-t5.PagedGrid pagedsource="collectionpagedsource" pagination="[1,2,3]" checkboxes="true">
- </t:ic-t5.PagedGrid>
-
-
- <t:ic-t5.PagedGrid pagedsource="hibernatepagedsource">
- </t:ic-t5.PagedGrid>
-
-</html>
7 src/test/resources/nl/intercommit/tapestry/test/pages/PopupWindowPage.tml
View
@@ -1,7 +0,0 @@
-<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"
- xmlns:p="tapestry:parameter">
-
- <div t:id="popupWindow" zoneName="windowZone">
- Window Contents.
- </div>
-</html>
19 src/test/resources/nl/intercommit/tapestry/test/pages/SwitchPage.tml
View
@@ -1,19 +0,0 @@
-<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"
- xmlns:p="tapestry:parameter">
-
- <t:ic-t5.switch value="testvalue" defaultHTML="html">
- <t:parameter name="ONE" >
- one!
- </t:parameter>
-
- <t:parameter name="two" >
- two!
- </t:parameter>
-
- <t:parameter name="someother" >
- someother...
- </t:parameter>
-
- </t:ic-t5.switch>
-
-</html>
6 src/test/resources/nl/intercommit/tapestry/test/pages/TextMarkerPage.tml
View
@@ -1,6 +0,0 @@
-<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"
- xmlns:p="tapestry:parameter">
- <div id="result">
- <t:ic-t5.textmarker value="message" keywords="words" paddingSize="15" maxLength="maxLength"></t:ic-t5.textmarker>
- </div>
-</html>
Please sign in to comment.
Something went wrong with that request. Please try again.