Exemplo n.º 1
0
        public void Analyze_Of_A_Test_With_No_Object_Id_Should_Return_Unknown()
        {
            var results = new oval_results();
            results.oval_definitions = new oval_definitions();
            var fakeTest = MockRepository.GenerateMock<Modulo.Collect.OVAL.Definitions.TestType>();
            fakeTest.Expect(x => x.HasObjectReference).Return(false).Repeat.Any();
            results.oval_definitions.tests = new [] { fakeTest };

            var target = new Modulo.Collect.OVAL.Results.TestType();
            target.test_id = results.oval_definitions.tests[0].id;
            
            ResultEnumeration result = target.Analyze(results);
            Assert.AreEqual(ResultEnumeration.unknown, result);
        }
Exemplo n.º 2
0
        public void Analyze_Of_A_Test_With_No_Object_Id_Should_Return_Unknown()
        {
            var results = new oval_results();

            results.oval_definitions = new oval_definitions();
            var fakeTest = MockRepository.GenerateMock <Modulo.Collect.OVAL.Definitions.TestType>();

            fakeTest.Expect(x => x.HasObjectReference).Return(false).Repeat.Any();
            results.oval_definitions.tests = new [] { fakeTest };

            var target = new Modulo.Collect.OVAL.Results.TestType();

            target.test_id = results.oval_definitions.tests[0].id;

            ResultEnumeration result = target.Analyze(results);

            Assert.AreEqual(ResultEnumeration.unknown, result);
        }