Ejemplo n.º 1
0
        public void InstantiateServiceTest()
        {
            //Arrange
            var table = mTableBuilder.FromJson(Constants.Rules.CreateForms.DECISION_TABLE_PATH_7);
            CreateFormDecisionTable compiledTable;
            List <string>           errors;

            if (!mTableBuilder.Compile(table, out compiledTable, out errors))
            {
                throw new Exception(String.Format("An error occurred while compiling table from {0}",
                                                  Constants.Rules.CreateForms.DECISION_TABLE_PATH_7));
            }

            //Act
            var service = new CreateFormDecisionService(mLogger, compiledTable);

            //Assert
            Assert.IsNotNull(service);
        }
Ejemplo n.º 2
0
        private CreateFormDecisionService GetDecisionService()
        {
            var table = mTableBuilder.FromJson(Constants.Rules.CreateForms.DECISION_TABLE_PATH_7);
            CreateFormDecisionTable compiledTable;
            List <string>           errors;

            if (!mTableBuilder.Compile(table, out compiledTable, out errors))
            {
                throw new Exception(String.Format("An error occurred while compiling table from {0}",
                                                  Constants.Rules.CreateForms.DECISION_TABLE_PATH_1));
            }

            var service = new CreateFormDecisionService(mLogger, compiledTable);

            if (service == null)
            {
                throw new Exception("service was null");
            }

            return(service);
        }