public OvalTimeDifferenceBuilder(OvalLocalVariableBuilder localVariableBuilder) { this.timeDifference = new TimeDifferenceFunctionType(); // the oval schema constraints this.timeDifference.Items = new object[2]; this.localVariableBuilder = localVariableBuilder; }
public void Should_be_possible_to_instantiate_an_TimeDifferenceFunctionComponent() { var function = new TimeDifferenceFunctionType() { Items = new object[] { new ObjectComponentType(), new ObjectComponentType() } }; var localVariable = new VariablesTypeVariableLocal_variable() { Item = function }; var factory = new LocalVariableComponentsFactory(null, null); var variableComponent = factory.GetLocalVariableComponent(localVariable); Assert.IsInstanceOfType(variableComponent, typeof(TimeDifferenceFunctionComponent)); Assert.IsTrue(((TimeDifferenceFunctionComponent)variableComponent).QuantityOfComponents() == 2, "the quantity of component is not expected"); }