예제 #1
0
//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")));
        }
예제 #2
0
 public override BpmnModelInstance clone()
 {
     return(modelInstance.clone());
 }
예제 #3
0
 /// <summary>
 /// Copies the argument; following modifications are not applied to the original model instance
 /// </summary>
 public static ModifiableBpmnModelInstance modify(BpmnModelInstance modelInstance)
 {
     return(new ModifiableBpmnModelInstance(modelInstance.clone()));
 }