Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }