Esempio n. 1
0
        public void Should_be_possible_to_verify_if_a_set_has_another_set()
        {
            set setElement = SetFactory.GetSetFromDefinitionsOfRegistryObject("definitionsWithSet.xml", "oval:org.mitre.oval:obj:5000");

            Assert.AreEqual(true, setElement.ExistsAnotherSetElement(), "the set element not has another set");

            setElement = SetFactory.GetSetFromDefinitionsOfRegistryObject("definitionsWithSet.xml", "oval:org.mitre.oval:obj:6000");
            Assert.AreEqual(false, setElement.ExistsAnotherSetElement(), "the set element has another set");
        }
Esempio n. 2
0
        /// <summary>
        /// Evaluates the specified setElement
        /// </summary>
        /// <param name="set">object that represents a Set</param>
        /// <returns></returns>
        public SetResult Evaluate(set setElement)
        {
            if (this.systemCharacteristics == null)
                return new SetResult( new List<String>(),FlagEnumeration.notcollected);

            if (setElement.ExistsAnotherSetElement())
            {
                return EvaluateOtherSets(setElement);
            }
            else
            {
                return EvaluateSetElement(setElement);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Evaluates the specified setElement
        /// </summary>
        /// <param name="set">object that represents a Set</param>
        /// <returns></returns>
        public SetResult Evaluate(set setElement)
        {
            if (this.systemCharacteristics == null)
            {
                return(new SetResult(new List <String>(), FlagEnumeration.notcollected));
            }

            if (setElement.ExistsAnotherSetElement())
            {
                return(EvaluateOtherSets(setElement));
            }
            else
            {
                return(EvaluateSetElement(setElement));
            }
        }