Пример #1
0
        public void When_some_error_occurred_during_item_type_generation_a_item_with_status_equals_to_error_must_be_returned()
        {
            var prober = new FileContentProber();

            ProberBehaviorCreator.CreateBehaviorWithExceptionThrowing(prober);

            var proberResult = prober.Execute(FakeContext, FakeTargetInfo, FakeCollectInfo);

            DoAssertForExecutionWithErrors(proberResult, typeof(textfilecontent_item));
        }
Пример #2
0
        public void Should_be_possible_to_execute_a_simple_textFileContent_collect_defined_with_one_entity()
        {
            var prober = new FileContentProber();

            ProberBehaviorCreator
            .CreateBehaviorForNormalFlowExecution(
                prober,
                FakeItemsToReturn,
                FakeCollectedItem);

            var proberResult = prober.Execute(FakeContext, FakeTargetInfo, FakeCollectInfo);

            DoAssertForSingleCollectedObject(proberResult, typeof(textfilecontent_item));

            var textFileContentItem = (textfilecontent_item)proberResult.CollectedObjects.Single().SystemData.Single();

            this.AssertTextFileContentItem(textFileContentItem, "teste", StatusEnumeration.exists);
        }