public void GetStartElementId_ProcessWithOneStartEvent_IdentifyInitialTask() { // Arrange string definitions = LoadResourceAsString("Altinn.Process.UnitTest.TestData.default_process.bpmn"); BpmnReader target = BpmnReader.Create(definitions); // Act string actual = target.GetStartElementId(); // Assert Assert.NotNull(actual); Assert.Equal("FormFilling_1", actual); }
public void GetStartElementId_ProcessWithTwoStartEvents_IdentifyInitialTask_ThrowsProcessException() { // Arrange string definitions = LoadResourceAsString("Altinn.Process.UnitTest.TestData.multiple_events.bpmn"); BpmnReader target = BpmnReader.Create(definitions); ProcessException actual = null; // Act try { _ = target.GetStartElementId(); } catch (ProcessException pe) { actual = pe; } // Assert Assert.NotNull(actual); Assert.IsType <ProcessException>(actual); }