Beispiel #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldGenerateIdsOnCreate()
        public virtual void shouldGenerateIdsOnCreate()
        {
            BpmnModelInstance modelInstance = Bpmn.createEmptyModel();
            Definitions       definitions   = modelInstance.newInstance(typeof(Definitions));

            assertThat(definitions.Id).NotNull;

            Process process = modelInstance.newInstance(typeof(Process));

            assertThat(process.Id).NotNull;

            StartEvent startEvent = modelInstance.newInstance(typeof(StartEvent));

            assertThat(startEvent.Id).NotNull;

            UserTask userTask = modelInstance.newInstance(typeof(UserTask));

            assertThat(userTask.Id).NotNull;
        }
Beispiel #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldNotGenerateIdsOnRead()
        public virtual void shouldNotGenerateIdsOnRead()
        {
            BpmnModelInstance modelInstance = Bpmn.readModelFromStream(typeof(GenerateIdTest).getResourceAsStream("GenerateIdTest.bpmn"));
            Definitions       definitions   = modelInstance.Definitions;

            assertThat(definitions.Id).Null;

            Process process = modelInstance.getModelElementsByType(typeof(Process)).GetEnumerator().next();

            assertThat(process.Id).Null;

            StartEvent startEvent = modelInstance.getModelElementsByType(typeof(StartEvent)).GetEnumerator().next();

            assertThat(startEvent.Id).Null;

            UserTask userTask = modelInstance.getModelElementsByType(typeof(UserTask)).GetEnumerator().next();

            assertThat(userTask.Id).Null;
        }