Ejemplo n.º 1
0
        public void Create_ShouldReturnSequenceOfDummyControlFlowDescriptors_WhenSequenceDescriptorIsPassed()
        {
            // Given in setup
            var sequence = new SequenceControlFlowElement(Fixture.CreateMany <CommandCallControlFlowElement>(3));

            // When
            var result = UnderTest.Create(sequence) as SequenceControlFlow;

            // Then
            Assert.That(result, Is.Not.Null);
            Assert.That(result.Children, Is.Not.Null);

            var children = result.Children.ToArray();

            Assert.That(children.Count(), Is.EqualTo(3));
            Assert.That(children.All(child => child is CommandCallControlFlow), Is.True);
        }
        public void Create_ShouldReturnSequenceOfDummyControlFlowDescriptors_WhenSequenceDescriptorIsPassed()
        {
            // Given in setup
            var sequence = new SequenceControlFlowElement(Fixture.CreateMany<CommandCallControlFlowElement>(3));

            // When
            var result = UnderTest.Create(sequence) as SequenceControlFlow;

            // Then
            Assert.That(result, Is.Not.Null);
            Assert.That(result.Children, Is.Not.Null);

            var children = result.Children.ToArray();
            Assert.That(children.Count(), Is.EqualTo(3));
            Assert.That(children.All(child => child is CommandCallControlFlow), Is.True);
        }