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); }
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"); }
public BeginFunctionComponent(BeginFunctionType beginFunctionType) { this.beginFunctionType = beginFunctionType; }
public BeginFunctionComponent(BeginFunctionType beginFunctionType) { this.beginFunctionType = beginFunctionType; }
public OvalBeginBuilder(OvalLocalVariableBuilder localVariableBuilder) { this.localVariableBuilder = localVariableBuilder; this.beginFunction = new BeginFunctionType(); }