public void Should_be_possible_to_generate_items_from_wmi_object_with_referenced_variable_in_wql_entity() { var fakeVariables = VariableHelper.CreateVariableWithOneValue("2223", "22222", WQL_TO_GET_FILESYSTEM); var generatedItems = new WmiItemTypeGenerator().GetItemsToCollect(GetOvalObjectByID("2223"), fakeVariables); AssertGeneratedWmiItem( generatedItems.ToArray(), "root\\default", WQL_TO_GET_FILESYSTEM); }
public void Should_be_possible_to_generate_items_from_wmi_object_with_referenced_variable_in_namespace_entity() { var fakeVariables = VariableHelper.CreateVariableWithOneValue("2222", "22221", ROOT_CIMV2_NAMESPACE); var generatedItems = new WmiItemTypeGenerator().GetItemsToCollect(GetOvalObjectByID("2222"), fakeVariables); AssertGeneratedWmiItem( generatedItems.ToArray(), ROOT_CIMV2_NAMESPACE, "select caption from Win32_OperatingSystem"); }
public void Should_be_possible_to_generate_items_from_wmi_object_with_referenced_variable_in_all_entities() { var variableValues = new Dictionary <string, IEnumerable <string> >(); variableValues.Add("oval:modulo:var:22221", new string[] { ROOT_CIMV2_NAMESPACE }); variableValues.Add("oval:modulo:var:22222", new string[] { WQL_TO_GET_FILESYSTEM }); var fakeVariables = VariableHelper.CreateEvaluatedVariables("2224", variableValues); var generatedItems = new WmiItemTypeGenerator().GetItemsToCollect(GetOvalObjectByID("2224"), fakeVariables); AssertGeneratedWmiItem( generatedItems.ToArray(), ROOT_CIMV2_NAMESPACE, WQL_TO_GET_FILESYSTEM); }
public void Should_be_possible_to_generate_items_from_wmi_object() { #region wmi_object //<wmi_object id="oval:modulo:obj:2200" version="1"> // <namespace>root\cimv2</namespace> // <wql>select caption from Win32_OperatingSystem</wql> //</wmi_object> #endregion var generatedItems = new WmiItemTypeGenerator().GetItemsToCollect(GetOvalObjectByID("2200"), null); AssertGeneratedWmiItem( generatedItems.ToArray(), "root\\cimv2", "select caption from Win32_OperatingSystem"); }