Package at.fhj.itm.util

Examples of at.fhj.itm.util.JsfUtilImpl


   
  }

  @Test
  public void testFrom() {
    SearchTrip a = new SearchTrip(new JsfUtilImpl(), EasyMock.createMock(ServiceTrip.class));
    Assert.assertNull(a.getFrom());
    a.setFrom("Foo");
    Assert.assertEquals("Foo", a.getFrom());
  }
View Full Code Here


    Assert.assertEquals("Foo", a.getFrom());
  }

  @Test
  public void testTo() {
    SearchTrip a = new SearchTrip(new JsfUtilImpl(), EasyMock.createMock(ServiceTrip.class));
    Assert.assertNull(a.getTo());
    a.setTo("Foo");
    Assert.assertEquals("Foo", a.getTo());
  }
View Full Code Here

    Assert.assertEquals("Foo", a.getTo());
  }

  @Test
  public void testTime() {
    SearchTrip a = new SearchTrip(new JsfUtilImpl(), EasyMock.createMock(ServiceTrip.class));
    Assert.assertNotNull(a.getDate());
    a.setDate(new Date(1234));
    Assert.assertEquals(new Date(1234), a.getDate());

    a.setLeaveTime(false);
View Full Code Here

    fail("Not yet implemented");
  }

  @Test
  public void testGetUrlForSearchResult() throws ParseException {
    SearchTrip a = new SearchTrip(new JsfUtilImpl(), EasyMock.createMock(ServiceTrip.class));
    a.setFrom("foo");
    a.setTo("boo");
    Date date = new Date(12345);
    a.setLeaveAt(a.getDateFormatForURL().format(date));
    String url = a.getAllInSearchUrl();
View Full Code Here

  @Override
  public JsfUtil createJsfUtil() {
    JsfUtil jsfUtil = (JsfUtil) FacesContext.getCurrentInstance()
        .getExternalContext().getSessionMap().get("jsfUtil");
    if (jsfUtil == null) {
      jsfUtil = new JsfUtilImpl();
      FacesContext.getCurrentInstance().getExternalContext()
          .getSessionMap().put("jsfUtil", jsfUtil);
    }
    return jsfUtil;
  }
View Full Code Here

TOP

Related Classes of at.fhj.itm.util.JsfUtilImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.