Esempio n. 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void failWhenExistingHistoryLevelIsNotRegistered()
        public virtual void failWhenExistingHistoryLevelIsNotRegistered()
        {
            // init the db with custom level
            HistoryLevel customLevel = new HistoryLevelAnonymousInnerClass(this);
            ProcessEngineConfigurationImpl config = config("true", "custom");

            config.CustomHistoryLevels = Arrays.asList(customLevel);
            processEngineImpl          = (ProcessEngineImpl)config.buildProcessEngine();

            thrown.expect(typeof(ProcessEngineException));
            thrown.expectMessage("The configured history level with id='99' is not registered in this config.");

            config.CommandExecutorSchemaOperations.execute(new DetermineHistoryLevelCmd(System.Linq.Enumerable.Empty <HistoryLevel>()));
        }
        public virtual void FailWhenExistingHistoryLevelIsNotRegistered()
        {
            // init the db with custom level
            IHistoryLevel customLevel             = new HistoryLevelAnonymousInnerClass(this);
            ProcessEngineConfigurationImpl config = Config("true", "custom");

            config.SetCustomHistoryLevels(new List <IHistoryLevel> {
                customLevel
            });
            _processEngineImpl = (ProcessEngineImpl)config.BuildProcessEngine();

            //Thrown.Expect(typeof(ProcessEngineException));
            //Thrown.ExpectMessage("The configured history level with id='99' is not registered in this config.");

            config.CommandExecutorSchemaOperations.Execute(new DetermineHistoryLevelCmd(new List <IHistoryLevel>()));
        }