Ejemplo n.º 1
0
 public OvalBeginBuilder(OvalLocalVariableBuilder localVariableBuilder)
 {
     this.localVariableBuilder = localVariableBuilder;
     this.beginFunction = new BeginFunctionType();  
 }
        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");
        }