Exemple #1
0
        public void Should_be_possible_to_collect_sql_object()
        {
            var sqlProber = new SqlProber();
            ProberBehaviorCreator
                .CreateBehaviorForNormalFlowExecution(
                    sqlProber,
                    new ItemType[] { FakeSqlItem },
                    new CollectedItem[] { ProbeHelper.CreateFakeCollectedItem(FakeCollectedSqlItem) });

            var probeResult = sqlProber.Execute(FakeContext, FakeTargetInfo, GetFakeCollectInfo("oval:modulo:obj:5000"));

            DoAssertForSingleCollectedObject(probeResult, typeof(sql_item));
        }
Exemple #2
0
        public void If_any_occurs_while_item_type_creation_an_item_with_error_status_must_be_returned_for_sql_objects()
        {
            var sqlProber = new SqlProber();
            var fakeCollectedInfo = GetFakeCollectInfo("oval:modulo:obj:5000");
            ProberBehaviorCreator.CreateBehaviorWithExceptionThrowing(sqlProber);

            var proberExecutionResult = sqlProber.Execute(FakeContext, FakeTargetInfo, fakeCollectedInfo);

            DoAssertForExecutionWithErrors(proberExecutionResult, typeof(sql_item));
        }