public ConcatFunctionComponent(ConcatFunctionType concatFunctionType, IEnumerable<VariableType> variablesOfDefinitions, oval_system_characteristics systemCharacteristics) { this.variablesOfDefinitions = variablesOfDefinitions; this.systemCharacteristics = systemCharacteristics; this.concatFunctionType = concatFunctionType; this.concatFunction = new OvalConcatFunction(base.components); }
public ConcatFunctionComponent(ConcatFunctionType concatFunctionType, IEnumerable <VariableType> variablesOfDefinitions, oval_system_characteristics systemCharacteristics) { this.variablesOfDefinitions = variablesOfDefinitions; this.systemCharacteristics = systemCharacteristics; this.concatFunctionType = concatFunctionType; this.concatFunction = new OvalConcatFunction(base.components); }
public void Should_be_possible_to_concat_the_values_of_components_in_the_list() { var systemCharacteristics = new OvalDocumentLoader().GetFakeOvalSystemCharacteristics("system_characteristics_with_local_variable.xml"); Assert.IsNotNull(systemCharacteristics, "the systemCharacteristics was not loaded"); var components = this.GetLocalVariableComponentList(systemCharacteristics); var concat = new OvalConcatFunction(components); var concatValues = concat.ConcatValues(); Assert.AreEqual(4, concatValues.Count, "the quantity of values is not expected"); Assert.AreEqual(@"BuildLabEx\SoftwareType", concatValues.ElementAt(0), NOT_EXPECTED_VALUE_WAS_FOUND); Assert.AreEqual(@"BuildLabEx\SystemRoot", concatValues.ElementAt(1), NOT_EXPECTED_VALUE_WAS_FOUND); Assert.AreEqual(@"CSDBuildNumber\SoftwareType",concatValues.ElementAt(2), NOT_EXPECTED_VALUE_WAS_FOUND); Assert.AreEqual(@"CSDBuildNumber\SystemRoot", concatValues.ElementAt(3), NOT_EXPECTED_VALUE_WAS_FOUND); }