Ejemplo n.º 1
0
 @When("select * from Trade")
 private void watchTrade(Trade t) {
   Market market = t.getMarket();
   if (watching(market.getListing())) {
     out.println(String.format("trade: %s\t%s (%s)", market, t.getPrice(), t.getVolume()));
     out.flush();
   }
 }
Ejemplo n.º 2
0
 @When("select * from Book")
 private void watchBook(Book b) {
   Market market = b.getMarket();
   if (watching(market.getListing())) {
     out.println(
         String.format(
             "book: %s\t%s (%s) - %s (%s)",
             market, b.getBidPrice(), b.getBidVolume(), b.getAskPrice(), b.getAskVolume()));
     out.flush();
   }
 }