//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testClone() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: public virtual void testClone() { BpmnModelInstance modelInstance = Bpmn.createEmptyModel(); Definitions definitions = modelInstance.newInstance(typeof(Definitions)); definitions.Id = "TestId"; modelInstance.Definitions = definitions; BpmnModelInstance cloneInstance = modelInstance.clone(); cloneInstance.Definitions.Id = "TestId2"; assertThat(modelInstance.Definitions.Id, @is(equalTo("TestId"))); assertThat(cloneInstance.Definitions.Id, @is(equalTo("TestId2"))); }
//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; }
//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; }