Examples of ISODateParam


Examples of com.wesabe.api.accounts.params.ISODateParam

  public static class Parsing_An_Extended_Calendar_Date {
    private ISODateParam param;
   
    @Before
    public void setup() throws Exception {
      this.param = new ISODateParam("2006-07-05");
    }
View Full Code Here

Examples of com.wesabe.api.accounts.params.ISODateParam

  public static class Parsing_A_Basic_Week_Date {
    private ISODateParam param;
   
    @Before
    public void setup() throws Exception {
      this.param = new ISODateParam("2006W27");
    }
View Full Code Here

Examples of com.wesabe.api.accounts.params.ISODateParam

  public static class Parsing_An_Extended_Week_Date {
    private ISODateParam param;
   
    @Before
    public void setup() throws Exception {
      this.param = new ISODateParam("2006-W27");
    }
View Full Code Here

Examples of com.wesabe.api.accounts.params.ISODateParam

  public static class Parsing_A_Basic_Week_Date_With_Weekday {
    private ISODateParam param;
   
    @Before
    public void setup() throws Exception {
      this.param = new ISODateParam("2006W273");
    }
View Full Code Here

Examples of com.wesabe.api.accounts.params.ISODateParam

  public static class Parsing_An_Extended_Week_Date_With_Weekday {
    private ISODateParam param;
   
    @Before
    public void setup() throws Exception {
      this.param = new ISODateParam("2006-W27-3");
    }
View Full Code Here

Examples of com.wesabe.api.accounts.params.ISODateParam

  public static class Parsing_A_Basic_Ordinal_Date {
    private ISODateParam param;
   
    @Before
    public void setup() throws Exception {
      this.param = new ISODateParam("2006186");
    }
View Full Code Here

Examples of com.wesabe.api.accounts.params.ISODateParam

  public static class Parsing_An_Extended_Ordinal_Date {
    private ISODateParam param;
   
    @Before
    public void setup() throws Exception {
      this.param = new ISODateParam("2006-186");
    }
View Full Code Here

Examples of com.wesabe.api.accounts.params.ISODateParam

  public static class Parsing_A_Invalid_Date {
   
    @Test
    public void itThrowsA400BadRequestWebApplicationException() throws Exception {
      try {
        new ISODateParam("X#H");
        fail("should have thrown a WebApplicationException but didn't");
      } catch (WebApplicationException e) {
        assertEquals(400, e.getResponse().getStatus());
        assertEquals("Invalid parameter: X#H (not a valid ISO 8601 date).", e.getResponse().getEntity());
      }
View Full Code Here

Examples of com.wesabe.api.accounts.params.ISODateParam

    public void setup() throws Exception {
      this.context = new MockResourceContext();
     
      this.currency = new CurrencyParam("GBP");
     
      this.startDate = new ISODateParam("20070801");
      this.endDate = new ISODateParam("20070901");
     
      this.accounts = mock(AccountList.class);
      when(context.getAccountDAO().findVisibleAccounts(Mockito.anyString())).thenReturn(accounts);
     
      this.txaction = mock(Txaction.class);
View Full Code Here

Examples of com.wesabe.api.accounts.params.ISODateParam

    }
   
    @Test
    public void itThrowsA404() throws Exception {
      try {
        resource.show(context.getUser(), Locale.CHINA, new CurrencyParam("USD"), new ISODateParam("20090801"), new ISODateParam("20090501"));
      } catch (WebApplicationException e) {
        assertThat(e.getResponse().getStatus(), is(404));
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.