Example #1
0
        private LocalVariableComponent CreateSplitFunctionComponent(object component, VariableType localVariable)
        {
            SplitFunctionType      splitFunctionType      = (SplitFunctionType)component;
            SplitFunctionComponent splitFunctionComponent = new SplitFunctionComponent(splitFunctionType);
            LocalVariableComponent variableComponent      = this.InstantiateTheCorrectTypeOfComponent(splitFunctionType.Item, localVariable);

            splitFunctionComponent.AddComponent(variableComponent);
            return(splitFunctionComponent);
        }
Example #2
0
        public void Should_be_possible_to_instantiate_an_SplitFunctionComponent()
        {
            var function = new SplitFunctionType()
            {
                Item = new LiteralComponentType()
            };
            var localVariable = new VariablesTypeVariableLocal_variable()
            {
                Item = function
            };

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

            Assert.IsInstanceOfType(variableComponent, typeof(SplitFunctionComponent));
            Assert.IsTrue(((SplitFunctionComponent)variableComponent).QuantityOfComponents() == 1, "the quantity of component is not expected");
        }
 public SplitFunctionComponent(SplitFunctionType component)
 {
     this.component = component;
 }
 public SplitFunctionComponent(SplitFunctionType component)
 {
     this.component = component;
 }
Example #5
0
 public OvalSplitBuilder(OvalLocalVariableBuilder ovalLocalVariableBuilder)
 {
     this.splitFunctionType    = new SplitFunctionType();
     this.localVariableBuilder = ovalLocalVariableBuilder;
 }