Ejemplo n.º 1
0
        public void Should_be_possible_to_get_value_of_local_variable()
        {
            VariablesTypeVariableLocal_variable variable = CreateALocalVariable();
            oval_system_characteristics systemCharacteristics = new OvalDocumentLoader().GetFakeOvalSystemCharacteristics("system_characteristics_with_local_variable.xml");

            LocalVariableEvaluator localVariableEvaluator = new LocalVariableEvaluator(variable, systemCharacteristics,null);
            IEnumerable<string> values = localVariableEvaluator.GetValue();
            Assert.IsTrue(values.Count() > 0, "the quantity of values is not expected.");
            Assert.IsTrue(values.ElementAt(0) == @"Software\Microsoft\Windows NT\CurrentVersion", "the value is not expected");
        }
Ejemplo n.º 2
0
        public void Should_be_possible_to_get_value_of_local_variable_without_system_characteristics()
        {
            VariablesTypeVariableLocal_variable variable = CreateALocalVariable();

            LocalVariableEvaluator localVariableEvaluator = new LocalVariableEvaluator(variable, null, null);
            IEnumerable<string> values = localVariableEvaluator.GetValue();
            Assert.IsTrue(values.Count() == 0, "the quantity of values is not expected.");
        }