Пример #1
0
        public void GetAllTransactionsGroups()
        {
            CompanyFixture.SaveNewMSZCompany();
            //
            TransactionGroup tran = CreateNewTransactionGroup();

            GroupController controller = new GroupController();
            ICollection<TransactionGroup> groups = controller.GetAllGroups();
            Assert.IsNotEmpty((ICollection)groups);
        }
Пример #2
0
        public void GetAllTransactionsByGroupId()
        {
            Company c = CompanyFixture.SaveNewMSZCompany();
            TransactionGroup group = GroupFixture.CreateNewTransactionGroup();
            Transaction tran = TransactionFixture.CreateNewTransaction(1);

            UnitOfWork.Current.TransactionalFlush();
            UnitOfWork.CurrentSession.Evict(tran);
            UnitOfWork.CurrentSession.Evict(group);
            UnitOfWork.CurrentSession.Evict(c);

            GroupController controller = new GroupController();
            ICollection<TransactionGroup> groups = controller.GetAllGroups();
            Assert.IsNotEmpty((ICollection)groups);

            TransactionController tr = new TransactionController();
            ICollection<Transaction> transactions = tr.GetAllTransaction();
            Assert.IsNotEmpty((ICollection)transactions);

            transactions = controller.GetAllTransactionForGroup(1);
            Assert.IsNotEmpty((ICollection)transactions);
        }