Exemple #1
0
        public void chart_of_account_insert_new()
        {
            ChartOfAccount newObject = new ChartOfAccount();

            Mock <IBusinessEngineFactory> mockBusinessEngineFactory = new Mock <IBusinessEngineFactory>();

            mockBusinessEngineFactory.Setup(mock => mock.GetBusinessEngine <IChartOfAccountBusinessEngine>().ChartOfAccountSave(newObject)).Returns(123);

            LedgerService service = new LedgerService(mockBusinessEngineFactory.Object);

            int update_ret_val = service.CreateChartOfAccount(newObject);

            Assert.IsTrue(update_ret_val == 123);
        }