private LocalVariableComponent CreateEndFunctionComponent(object component, VariableType localVariable) { EndFunctionType endFunctionType = (EndFunctionType)component; EndFunctionComponent endFunctionComponent = new EndFunctionComponent(endFunctionType); LocalVariableComponent localVariableComponent = this.InstantiateTheCorrectTypeOfComponent(endFunctionType.Item, localVariable); endFunctionComponent.AddComponent(localVariableComponent); return(endFunctionComponent); }
public void Should_be_possible_to_instantiate_an_EndFunctionComponent() { var function = new EndFunctionType() { 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(EndFunctionComponent)); Assert.IsTrue(((EndFunctionComponent)variableComponent).QuantityOfComponents() == 1, "the quantity of component is not expected"); }
public EndFunctionComponent(EndFunctionType endFunctionType) { this.endFunctionType = endFunctionType; }
public OvalEndBuilder(OvalLocalVariableBuilder localVariableBuilder) { this.localVariableBuilder = localVariableBuilder; this.endFunciton = new EndFunctionType(); }