Esempio n. 1
0
        public void If_any_occurs_while_item_type_creation_an_item_with_error_status_must_be_returned()
        {
            var textFileContentProber = new TextFileContentProberWindows();
            var fakeCollectInfo       = GetFakeCollectInfo("oval:modulo:obj:900");

            ProberBehaviorCreator.CreateBehaviorWithExceptionThrowing(textFileContentProber);

            var proberResult = textFileContentProber.Execute(FakeContext, FakeTargetInfo, fakeCollectInfo);

            DoAssertForExecutionWithErrors(proberResult, typeof(textfilecontent_item));
        }
Esempio n. 2
0
        public void Should_be_possible_to_collect_a_simple_TextFileContent54Object()
        {
            var textFileContentProber = new TextFileContentProberWindows();
            var fakeCollectInfo       = GetFakeCollectInfo("oval:modulo:obj:900");

            ProberBehaviorCreator.
            CreateBehaviorForNormalFlowExecution(
                textFileContentProber,
                FakeItemsToReturnByItemTypeGenerator,
                FakeColletedItems);

            var probeExecutionResult = textFileContentProber.Execute(FakeContext, FakeTargetInfo, fakeCollectInfo);

            var collectedObject = probeExecutionResult.CollectedObjects.ElementAt(0);

            this.AssertCollectedItemsReferences(collectedObject, collectedObject.SystemData);
            this.AssertCollectedItemStatus(collectedObject.ObjectType.reference.ElementAt(0), collectedObject.SystemData.ElementAt(0));
        }