Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.97 KB | None | 0 0
  1.  it should "create and process limit order434534534" in {
  2.     val asset = authorized { implicit auth =>
  3.       val asset = getAssets(auth.userId).head
  4.       createOffering(asset.id, 2, askPrice)
  5.       asset
  6.     }
  7.  
  8.     val asset2 = authorizedRandomUser { implicit auth =>
  9.       val asset2 = getAssets(auth.userId).head
  10.       val amount = 2
  11.       createTransaction(TransactionOperation.Deposit, askPrice * amount)
  12.       createOrder(asset.id, OrderType.Limit, OrderSide.Buy, askPrice, amount)
  13.       waitForUpdates()
  14.       createOrder(asset.id, OrderType.Limit, OrderSide.Sell, askPrice, amount)
  15.       val userDepoAccounts =  getUserInfo(auth.userId)
  16.       userDepoAccounts.depoAccounts should be (None)
  17.       asset2
  18.     }
  19.  
  20.     authorizedRandomUser { implicit auth =>
  21.       val amount = 2
  22.       createTransaction(TransactionOperation.Deposit, askPrice * amount)
  23.       createOrder(asset2.id, OrderType.Limit, OrderSide.Buy, askPrice, amount)
  24.       waitForUpdates()
  25.     }
  26.  
  27.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement