Package com.wesabe.api.accounts.params

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


      this.weirdOne = new Account("Brian Has Insane Accounts", USD);
      weirdOne.setRelativeId(400);
     
      when(context.getAccountDAO().findVisibleAccounts(anyString())).thenReturn(new AccountList(checking, savings, weirdOne));
     
      this.accountUris = ImmutableSet.of(new UriParam("/accounts/2"), new UriParam("/accounts/400"));
    }
View Full Code Here


      this.savings = new Account("Savings", USD);
      savings.setRelativeId(1);
     
      when(context.getAccountDAO().findVisibleAccounts(anyString())).thenReturn(new AccountList(checking, savings));
     
      this.accountUris = ImmutableSet.of(new UriParam("/accounts/2"), new UriParam("/accounts/woof"), new UriParam("/accouFFFnts/2"));
    }
View Full Code Here

  public static class Parsing_A_Valid_URI {
    private UriParam param;
   
    @Before
    public void setup() throws Exception {
      this.param = new UriParam("/whee/1");
    }
View Full Code Here

  public static class Parsing_A_Invalid_URI {
   
    @Test
    public void itThrowsA400BadRequestWebApplicationException() throws Exception {
      try {
        new UriParam("/%dg");
        fail("should have thrown a WebApplicationException but didn't");
      } catch (WebApplicationException e) {
        assertEquals(400, e.getResponse().getStatus());
        assertEquals("Invalid parameter: /%dg (not a valid URI).", e.getResponse().getEntity());
      }
View Full Code Here

      this.representation = mock(XmlsonObject.class);
      when(context.getIntervalSummaryPresenter().present(Mockito.any(ImmutableMap.class), Mockito.any(Locale.class))).thenReturn(representation);
     
      this.uneditedOnly = new BooleanParam("false");
     
      this.accountUris = ImmutableSet.of(new UriParam("/accounts/1"));
     
      this.tagUris = ImmutableSet.of("/tags/food");
     
      this.merchantNames = ImmutableSet.of("Starbucks");
     
View Full Code Here

TOP

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

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.