Package com.wesabe.api.accounts.params

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


     
      verify(context.getNetWorthSummaryPresenter()).present(summaries, Locale.CHINA);
    }

    private XmlsonObject handleGet() {
      return resource.show(context.getUser(), Locale.CHINA, new IntervalTypeParam("weekly"), new CurrencyParam("USD"), new ISODateParam("20090801"), new ISODateParam("20090901"), ImmutableSet.<UriParam>of(), ImmutableSet.<Tag>of());
    }
View Full Code Here


    }
   
    @Test
    public void itThrowsA404() throws Exception {
      try {
        resource.show(context.getUser(), Locale.CHINA, new IntervalTypeParam("weekly"), new CurrencyParam("USD"), new ISODateParam("20090801"), new ISODateParam("20090501"), ImmutableSet.<UriParam>of(), ImmutableSet.<Tag>of());
      } catch (WebApplicationException e) {
        assertThat(e.getResponse().getStatus(), is(404));
      }
    }
View Full Code Here

    }
   
    @Test
    public void itThrowsA404() throws Exception {
      try {
        resource.show(context.getUser(), Locale.CHINA, new IntervalTypeParam("weekly"), new CurrencyParam("USD"), new ISODateParam("20090801"), new ISODateParam("20090501"), new BooleanParam("false"), null, null, null, null, null);
      } catch (WebApplicationException e) {
        assertThat(e.getResponse().getStatus(), is(404));
      }
    }
View Full Code Here

          Mockito.any(Currency.class),
          Mockito.any(Locale.class)
        )
      ).thenReturn(xmlson);
     
      this.currency = new CurrencyParam("USD");
     
      this.resource = context.getInstance(OldAccountsResource.class);
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    @Before
    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.maxTags = new IntegerParam("5");
View Full Code Here

    public void itThrowsA404() throws Exception {
      try {
        resource.show(
          context.getUser(),
          Locale.CHINA,
          new CurrencyParam("USD"),
          new ISODateParam("20090801"),
          new ISODateParam("20090501"),
          new IntegerParam("5"),
          new BooleanParam("true"),
          new BooleanParam("true")
View Full Code Here

    @SuppressWarnings("unchecked")
    public void setup() throws Exception {
      this.context = new MockResourceContext();
      this.resource = context.getInstance(OldTxactionsResource.class);
     
      this.currency = new CurrencyParam("GBP");
      this.uneditedOnly = new BooleanParam("false");
      this.limit = null;
      this.offset = null;
      this.startDate = null;
      this.endDate = null;
View Full Code Here

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

 
  public static class Parsing_An_Invalid_Currency_Code {
    @Test
    public void itThrowsABadRequestError() throws Exception {
      try {
        new CurrencyParam("USFD");
      } catch (WebApplicationException e) {
        assertThat((String) e.getResponse().getEntity(), is("Invalid parameter: USFD (Unknown currency code: USFD)."));
      }
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    @Before
    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);
View Full Code Here

TOP

Related Classes of com.wesabe.api.accounts.params.CurrencyParam

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.