public void GetItems()
        {
            using (TransactionScope scope = new TransactionScope())
            {
                int id = SaveItem(PopulateNewItem());

                //retrieve all transaction Sub Types and the one we saved should return at least
                List <TransactionSubType> transactionSubTypes = TransactionSubTypeController.GetTransactionSubTypes();
                //so the count should be >0
                Assert.IsTrue(transactionSubTypes.Count > 0);
                //check for our new id
                Assert.IsTrue(transactionSubTypes.Find(delegate(TransactionSubType currentItem)
                {
                    return(currentItem.Id == id);
                }) != null);
            }
        }
Exemplo n.º 2
0
 private void PopulateTDCTransactionSubTypes()
 {
     // Populate tdc transaction types
     ddlTransactionSubType.DataSource = TransactionSubTypeController.GetTransactionSubTypes();
     ddlTransactionSubType.DataBind();
 }