Package com.wesabe.api.accounts.entities

Examples of com.wesabe.api.accounts.entities.Tag


   
    @Test
    public void itIgnoresMalformedTagURIs() throws Exception {
      resource.show(context.getUser(), Locale.CANADA_FRENCH, currency, uneditedOnly, limit, offset, startDate, endDate, accountUris, tagUris, merchantNames, amount, query);
     
      verify(context.getTxactionListBuilder()).setTags(ImmutableSet.of(new Tag("food")));
    }
View Full Code Here


    private SumOfMoney sum;
    private Node root;
   
    @Before
    public void setup() throws Exception {
      this.food = new Tag("food");
      this.sum = new SumOfMoney(money("20.12", USD), 12);
      this.root = new Node(food, sum, ImmutableList.<Node>of());
    }
View Full Code Here

    private SumOfMoney foodSpending, restaurantSpending, grocerySpending;
    private Node foodNode, restaurantNode, groceryNode;

    @Before
    public void setup() throws Exception {
      this.food = new Tag("food");
      this.foodSpending = new SumOfMoney(money("100.00", USD), 10);
      this.restaurants = new Tag("restaurants");
      this.restaurantSpending = new SumOfMoney(money("60.00", USD), 6);
      this.groceries = new Tag("groceries");
      this.grocerySpending = new SumOfMoney(money("40.00", USD), 4);

      this.restaurantNode = new Node(restaurants, restaurantSpending, ImmutableList.<Node>of());
      this.groceryNode = new Node(groceries, grocerySpending, ImmutableList.<Node>of());
      this.foodNode = new Node(food, foodSpending, ImmutableList.of(restaurantNode, groceryNode));
View Full Code Here

      assertEquals("food", food.toString());
    }
   
    @Test
    public void itIsEqualToItself() throws Exception {
      final Tag other = new Tag("food");
      assertTrue(food.equals(other));
      assertEquals(food.hashCode(), other.hashCode());
    }
View Full Code Here

      this.foodNode = new Node(food, foodSpending, ImmutableList.of(restaurantNode, groceryNode));
    }

    @Test
    public void itHasAChildNodeForRestaurants() throws Exception {
      assertThat(foodNode.getChildren().get(new Tag("restaurants"))).isEqualTo(restaurantNode);
    }
View Full Code Here

      assertEquals(food.hashCode(), other.hashCode());
    }
   
    @Test
    public void itIsEqualToAnUppercaseVersionOfItself() throws Exception {
      final Tag other = new Tag("FOOD");
      assertTrue(food.equals(other));
      assertEquals(food.hashCode(), other.hashCode());
    }
View Full Code Here

      assertEquals(food.hashCode(), other.hashCode());
    }
   
    @Test
    public void itIsEqualToAPluralVersionOfItself() throws Exception {
      final Tag other = new Tag("foods");
      assertTrue(food.equals(other));
      assertEquals(food.hashCode(), other.hashCode());
    }
View Full Code Here

      assertEquals(food.hashCode(), other.hashCode());
    }
   
    @Test
    public void itIsEqualToAPunctuatedVersionOfItself() throws Exception {
      final Tag other = new Tag("food!");
      assertTrue(food.equals(other));
      assertEquals(food.hashCode(), other.hashCode());
    }
View Full Code Here

      assertEquals(food.hashCode(), other.hashCode());
    }
   
    @Test
    public void itIsEqualToAVersionOfItselfWithWhitespace() throws Exception {
      final Tag other = new Tag("f o\tod");
      assertTrue(food.equals(other));
      assertEquals(food.hashCode(), other.hashCode());
    }
View Full Code Here

      assertEquals("rent", rent.toString());
    }
   
    @Test
    public void itIsEqualToItself() throws Exception {
      final Tag other = new Tag("rent:50%");
      assertTrue(rent.equals(other));
      assertEquals(rent.hashCode(), other.hashCode());
    }
View Full Code Here

TOP

Related Classes of com.wesabe.api.accounts.entities.Tag

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.