public void Should_be_possible_to_add_other_components_in_the_function() { ConcatFunctionComponent functionComponent = new ConcatFunctionComponent(null, null, null); LocalVariableObjectComponent objectComponent = new LocalVariableObjectComponent(null, null); functionComponent.AddComponent(objectComponent); Assert.IsTrue(functionComponent.QuantityOfComponents() == 1, "the quantity of component is not expected"); }
/// <summary> /// Creates the concat function component. /// </summary> /// <param name="component">The component.</param> /// <param name="localVariable">The local variable.</param> /// <returns></returns> private LocalVariableComponent CreateConcatFunctionComponent(Object component, VariableType localVariable) { ConcatFunctionType concatFunctionType = (ConcatFunctionType)component; ConcatFunctionComponent concatFunctionComponent = new ConcatFunctionComponent(concatFunctionType, this.variablesOfDefinitions, this.systemCharacteristics); for (int i = 0; i < concatFunctionType.Items.Count(); i++) { LocalVariableComponent variableComponent = this.InstantiateTheCorrectTypeOfComponent(concatFunctionType.Items[i], localVariable); concatFunctionComponent.AddComponent(variableComponent); } return(concatFunctionComponent); }