Package com.wesabe.api.accounts.analytics.TagHierarchy

Examples of com.wesabe.api.accounts.analytics.TagHierarchy.Node


      );
    }
   
    @Test
    public void itUsesFoodAsATopTag() throws Exception {
      final Node food = hierarchy.getChildren().get(tag("food"));
      assertThat(food.getSum().getAmount()).isEqualTo(money("1000.00", USD));
      assertThat(food.getSum().getCount()).isEqualTo(4);
    }
View Full Code Here


      assertThat(food.getSum().getCount()).isEqualTo(4);
    }
   
    @Test
    public void itNestsTheFancyTagUnderFood() throws Exception {
      final Node food = hierarchy.getChildren().get(tag("food"));
      final Node fancy = food.getChildren().get(tag("fancy"));
      assertThat(fancy.getSum().getAmount()).isEqualTo(money("300.00", USD));
      assertThat(fancy.getSum().getCount()).isEqualTo(1);
      assertThat(fancy.getChildren()).isEmpty();
    }
View Full Code Here

      assertThat(fancy.getChildren()).isEmpty();
    }
   
    @Test
    public void itNestsTheGroceriesTagtUnderFood() throws Exception {
      final Node food = hierarchy.getChildren().get(tag("food"));
      final Node groceries = food.getChildren().get(tag("groceries"));
      assertThat(groceries.getSum().getAmount()).isEqualTo(money("600.00", USD));
      assertThat(groceries.getSum().getCount()).isEqualTo(2);
      assertThat(groceries.getChildren()).isEmpty();
    }
View Full Code Here

      assertThat(groceries.getChildren()).isEmpty();
    }
   
    @Test
    public void itNestsTheItalianTagtUnderFood() throws Exception {
      final Node food = hierarchy.getChildren().get(tag("food"));
      final Node italian = food.getChildren().get(tag("italian"));
      assertThat(italian.getSum().getAmount()).isEqualTo(money("100.00", USD));
      assertThat(italian.getSum().getCount()).isEqualTo(1);
      assertThat(italian.getChildren()).isEmpty();
    }
View Full Code Here

      assertThat(italian.getChildren()).isEmpty();
    }
   
    @Test
    public void itUsesCreditCardAsATopTag() throws Exception {
      final Node creditcard = hierarchy.getChildren().get(tag("creditcard"));
      assertThat(creditcard.getSum().getAmount()).isEqualTo(money("50.00", USD));
      assertThat(creditcard.getSum().getCount()).isEqualTo(1);
    }
View Full Code Here

      assertThat(creditcard.getSum().getCount()).isEqualTo(1);
    }
   
    @Test
    public void itNestsTheFeeTagUnderCreditCard() throws Exception {
      final Node creditcard = hierarchy.getChildren().get(tag("creditcard"));
      final Node fee = creditcard.getChildren().get(tag("fee"));
      assertThat(fee.getSum().getAmount()).isEqualTo(money("50.00", USD));
      assertThat(fee.getSum().getCount()).isEqualTo(1);
      assertThat(fee.getChildren()).isEmpty();
    }
View Full Code Here

      assertThat(fee.getChildren()).isEmpty();
    }
   
    @Test
    public void itUsesRestaurantAsATopTag() throws Exception {
      final Node restaurant = hierarchy.getChildren().get(tag("restaurant"));
      assertThat(restaurant.getSum().getAmount()).isEqualTo(money("5.00", USD));
      assertThat(restaurant.getSum().getCount()).isEqualTo(1);
    }
View Full Code Here

      assertThat(restaurant.getSum().getCount()).isEqualTo(1);
    }
   
    @Test
    public void itNestsTheCoffeeTagUnderCreditCard() throws Exception {
      final Node restaurant = hierarchy.getChildren().get(tag("restaurant"));
      final Node coffee = restaurant.getChildren().get(tag("coffee"));
      assertThat(coffee.getSum().getAmount()).isEqualTo(money("5.00", USD));
      assertThat(coffee.getSum().getCount()).isEqualTo(1);
      assertThat(coffee.getChildren()).isEmpty();
    }
View Full Code Here

      assertThat(coffee.getChildren()).isEmpty();
    }
   
    @Test
    public void itUsesRentAsATopTag() throws Exception {
      final Node rent = hierarchy.getChildren().get(tag("rent"));
      assertThat(rent.getSum().getAmount()).isEqualTo(money("1500.00", USD));
      assertThat(rent.getSum().getCount()).isEqualTo(1);
      assertThat(rent.getChildren()).isEmpty();
    }
View Full Code Here

      );
    }

        @Test
        public void itCountsFeeAsARootTag() throws Exception {
            final Node fee = hierarchy.getChildren().get(tag("fee"));
            assertThat(fee.getSum().getAmount()).isEqualTo(money("3.50", USD));
            assertThat(fee.getSum().getCount()).isEqualTo(1);

            assertThat(fee.getChildren()).isEmpty();
        }
View Full Code Here

TOP

Related Classes of com.wesabe.api.accounts.analytics.TagHierarchy.Node

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.