protected override IEnumerable <CollectedItem> collectDataForSystemItem(ItemType systemItem)
        {
            if (this.AuditEventPolicyHelper == null)
            {
                this.AuditEventPolicyHelper = new AuditEventPolicyHelper(this.TargetInfo);
            }

            var auditEventPolicySubcategories = this.AuditEventPolicyHelper.GetAuditEventSubcategoriesPolicy(this.TargetInfo);

            this.MapAuditEventSubcategoriesDictionaryToItemType(auditEventPolicySubcategories, (auditeventpolicysubcategories_item)systemItem);

            return(new ItemTypeHelper().CreateCollectedItemsWithOneItem(systemItem, BuildExecutionLog()));
        }
Esempio n. 2
0
        private AuditEventPolicySubcategoriesObjectCollector CreateMockedSystemDataSource(
            Dictionary <AuditEventSubcategories, AuditEventStatus> fakeAuditEventSubcategoriesToReturn, out AuditEventPolicyHelper fakeHelper)
        {
            MockRepository mocks = new MockRepository();

            fakeHelper = mocks.DynamicMock <AuditEventPolicyHelper>(this.FakeTargetInfo);
            Expect.Call(fakeHelper.GetAuditEventSubcategoriesPolicy(null)).IgnoreArguments().Return(fakeAuditEventSubcategoriesToReturn);
            mocks.ReplayAll();

            return(new AuditEventPolicySubcategoriesObjectCollector()
            {
                AuditEventPolicyHelper = fakeHelper
            });
        }