Package com.wesabe.api.accounts.params

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


      this.currency = new CurrencyParam("GBP");

      this.startDate = new ISODateParam("20070801");
      this.endDate = new ISODateParam("20070901");
     
      this.maxTags = new IntegerParam("5");
      this.rankByAmount = new BooleanParam("true");
      this.spending = new BooleanParam("true");

      this.accounts = mock(AccountList.class);
      when(context.getAccountDAO().findVisibleAccounts(Mockito.anyString())).thenReturn(accounts);
View Full Code Here


          context.getUser(),
          Locale.CHINA,
          new CurrencyParam("USD"),
          new ISODateParam("20090801"),
          new ISODateParam("20090501"),
          new IntegerParam("5"),
          new BooleanParam("true"),
          new BooleanParam("true")
        );
      } catch (WebApplicationException e) {
        assertThat(e.getResponse().getStatus()).isEqualTo(404);
View Full Code Here

      when(account.getAccountBalances()).thenReturn(Sets.newHashSet(accountBalance));
    }
   
    @Test
    public void itPresentsAllAccountBalances() {
      accountBalancesResource.list(user, Locale.ENGLISH, new IntegerParam("1"));
      verify(accountBalancePresenter).present(accountBalance, Locale.ENGLISH);
    }
View Full Code Here

      when(account.getAccountBalances()).thenReturn(Sets.newHashSet(accountBalance));
    }
   
    @Test
    public void itDoesNotPresentAnyAccountBalances() {
      accountBalancesResource.list(user, Locale.ENGLISH, new IntegerParam("1"));
      verify(accountBalancePresenter, never()).present(Mockito.any(AccountBalance.class), eq(Locale.ENGLISH));
    }
View Full Code Here

      super.setup();
    }
   
    @Test
    public void itCreatesANewAccountBalance() {
      accountBalancesResource.create(user, Locale.ENGLISH, new IntegerParam("1"), new DecimalParam("20"));
      verify(accountBalanceDAO).create(Mockito.any(AccountBalance.class));
    }
View Full Code Here

    }
   
    @Test
    public void itReturnsBadRequest() {
      try {
        accountBalancesResource.create(user, Locale.ENGLISH, new IntegerParam("1"), null);
        fail("expected a Bad Request exception");
      } catch (WebApplicationException ex) {
        assertThat(ex.getResponse().getStatus()).isEqualTo(Status.BAD_REQUEST.getStatusCode());
      }
    }
View Full Code Here

    }
   
    @Test
    public void itReturnsBadRequest() {
      try {
        accountBalancesResource.create(user, Locale.ENGLISH, new IntegerParam("1"), new DecimalParam("20"));
        fail("expected a Bad Request exception");
      } catch (WebApplicationException ex) {
        assertThat(ex.getResponse().getStatus()).isEqualTo(Status.BAD_REQUEST.getStatusCode());
      }
    }
View Full Code Here

  public static class Building_A_Transactions_List_With_An_Offset extends Context {
    @Before
    @Override
    public void setup() throws Exception {
      super.setup();
      this.offset = new IntegerParam("200");
    }
View Full Code Here

  public static class Building_A_Transactions_List_With_A_Limit extends Context {
    @Before
    @Override
    public void setup() throws Exception {
      super.setup();
      this.limit = new IntegerParam("10");
    }
View Full Code Here

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

TOP

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

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.