Example #1
0
        private LocalVariableComponent CreateBeginFunctionComponent(object component, VariableType localVariable)
        {
            BeginFunctionType      beginFunctionType      = (BeginFunctionType)component;
            BeginFunctionComponent beginFunctionComponent = new BeginFunctionComponent(beginFunctionType);
            LocalVariableComponent localVariableComponent = this.InstantiateTheCorrectTypeOfComponent(beginFunctionType.Item, localVariable);

            beginFunctionComponent.AddComponent(localVariableComponent);
            return(beginFunctionComponent);
        }
Example #2
0
        public void Should_be_possible_to_instantiate_a_BeginFunctionComponent()
        {
            var function = new BeginFunctionType()
            {
                Item = new LiteralComponentType()
            };
            var localVariable = new VariablesTypeVariableLocal_variable()
            {
                Item = function
            };

            LocalVariableComponentsFactory factory = new LocalVariableComponentsFactory(null, null);
            var variableComponent = factory.GetLocalVariableComponent(localVariable);

            Assert.IsInstanceOfType(variableComponent, typeof(BeginFunctionComponent));
            Assert.IsTrue(((BeginFunctionComponent)variableComponent).QuantityOfComponents() == 1, "the quantity of component is not expected");
        }
Example #3
0
 public BeginFunctionComponent(BeginFunctionType beginFunctionType)
 {
     this.beginFunctionType = beginFunctionType;
 }
 public BeginFunctionComponent(BeginFunctionType beginFunctionType)
 {
     this.beginFunctionType = beginFunctionType;
 }
Example #5
0
 public OvalBeginBuilder(OvalLocalVariableBuilder localVariableBuilder)
 {
     this.localVariableBuilder = localVariableBuilder;
     this.beginFunction        = new BeginFunctionType();
 }