public void setUp() { data = new DataManager (); Transaction ta = new Transaction (); ta.id = 0; ta.transactionType = TransactionType.BUY; ta.date = new DateTime (); ta.paperName = "AMAZON"; ta.stockExchange = "OMX_COPENHAGEN"; ta.currency = "DKK"; ta.numberOfItems = 1; ta.valuation = 1000; ta.amount = 1000; Assert.AreEqual (1, data.SaveTransaction (ta)); }
public long SaveTransaction (Transaction item) { return sync.InsertOrReplace (item); }