Examples of Txaction


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

      assertEquals(0, txactionWithNullCreatedAt.compareTo(txaction));
    }
   
    @Test
    public void itComesBeforeAnotherTxactionOnTheSameDateWithTheSameSequenceWithALaterCreationDate() throws Exception {
      Txaction txactionWithLaterCreationDate = new Txaction(euroSavings, decimal("-34.22"), jun15th);
      txactionWithLaterCreationDate.setSequence(txaction.getSequence());
      inject(Txaction.class, txactionWithLaterCreationDate, "createdAt", jun17th);
      assertEquals(-1, txaction.compareTo(txactionWithLaterCreationDate));
      assertEquals(1, txactionWithLaterCreationDate.compareTo(txaction));
    }
View Full Code Here

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

    private final Account account = new Account("checking", USD);
    private final Txaction txaction = new Txaction(account, decimal("-34.22"), now());
   
    @Test
    public void itIsATransfer() throws Exception {
      txaction.setTransferTxaction(new Txaction());
      assertTrue(txaction.isTransfer());
    }
View Full Code Here

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

  public static class Calculating_Filtered_Amounts_With_No_Tags {
    private final Account account = new Account("checking", USD);
   
    @Test
    public void itDoesntFilterAnyPartOfANegativeAmount() throws Exception {
      final Txaction txaction = new Txaction(account, decimal("-34.22"), now());
      assertEquals(money("-34.22", USD), txaction.getAmountByFilteringTags(Sets.newHashSet(food)));
      assertEquals(money("-34.22", USD), txaction.getAmountByFilteringTags(Sets.newHashSet(groceries, food)));
    }
View Full Code Here

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

      assertEquals(money("-34.22", USD), txaction.getAmountByFilteringTags(Sets.newHashSet(groceries, food)));
    }
   
    @Test
    public void itDoesntFilterAnyPartOfAPositiveAmount() throws Exception {
      final Txaction txaction = new Txaction(account, decimal("34.22"), now());
      assertEquals(money("34.22", USD), txaction.getAmountByFilteringTags(Sets.newHashSet(food)));
      assertEquals(money("34.22", USD), txaction.getAmountByFilteringTags(Sets.newHashSet(groceries, food)));
    }
View Full Code Here

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

    private Txaction txaction;
   
    @Before
    public void setup() {
      account = new Account("checking", USD);
      txaction = new Txaction(account, decimal("-34.22"), now());
      txaction.addTag(food);
      txaction.addTag(groceries);
    }
View Full Code Here

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

    private Txaction txaction;
   
    @Before
    public void setup() {
      account = new Account("checking", USD);
      txaction = new Txaction(account, decimal("-34.22"), now());
      txaction.addTag(cash, decimal("-20.00"));
      txaction.addTag(groceries, decimal("-14.22"));
    }
View Full Code Here

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

    private Account account = new Account("checking", USD);
    private Txaction txaction;
   
    @Before
    public void setup() {
      txaction = new Txaction(account, decimal("-40.00"), now());
      txaction.addTag(transfer, decimal("-20.00"));
      txaction.addTag(lunch, decimal("-20.00"));
      txaction.addTag(dining, decimal("-20.00"));
      txaction.addTag(food, decimal("-20.00"));
    }
View Full Code Here

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

    private Txaction txaction;
   
    @Before
    public void setup() {
      account = new Account("checking", USD);
      txaction = new Txaction(account, decimal("34.22"), now());
      txaction.addTag(cash, decimal("20.00"));
      txaction.addTag(groceries, decimal("14.22"));
    }
View Full Code Here

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

      return this;
    }
  }
 
  public static TxactionBuilder from(Account account) {
    return new TxactionBuilder(new Txaction()).from(account);
  }
View Full Code Here

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

  public static TxactionBuilder from(Account account) {
    return new TxactionBuilder(new Txaction()).from(account);
  }
 
  public static TxactionBuilder spent(String amount) {
    return new TxactionBuilder(new Txaction()).spent(amount);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.