public void Should_be_possible_to_generate_items_to_collect_from_a_user_object()
        {
            var fakeObject = new UserObjectFactory().NewObject("Guest");

            var itemsToCollect = new UserItemTypeGenerator(null).GetItemsToCollect(fakeObject, null);

            ItemTypeChecker.DoBasicAssertForItems(itemsToCollect, 1, typeof(user_item), StatusEnumeration.notcollected);
            ItemTypeEntityChecker.AssertItemTypeEntity(itemsToCollect.OfType<user_item>().Single().user, "Guest");
        }
        public void Should_be_possible_to_generate_items_to_collect_from_a_user_object_with_variable_reference()
        {
            var variableID = "oval:org.modsic:var:1";
            var fakeObject = new UserObjectFactory().NewObjectWithVariable(variableID);
            var fakeVariables = VariableHelper.CreateVariableWithOneValue(fakeObject.id, variableID, "Everyone");
            
            var itemsToCollect = new UserItemTypeGenerator(null).GetItemsToCollect(fakeObject, fakeVariables);

            ItemTypeChecker.DoBasicAssertForItems(itemsToCollect, 1, typeof(user_item), StatusEnumeration.notcollected);
            ItemTypeEntityChecker.AssertItemTypeEntity(itemsToCollect.OfType<user_item>().Single().user, "Everyone");
        }
Exemple #3
0
 protected override void ConfigureObjectCollector()
 {
     if (this.ObjectCollector == null)
     {
         var wmiProvider = new WmiDataProvider(((FileConnectionProvider)ConnectionProvider).ConnectionScope);
         var accountProvider = new WindowsUsersProvider(wmiProvider, this.TargetInfo);
         
         ObjectCollector = new UserObjectCollector(accountProvider);
         if (ItemTypeGenerator == null)
             ItemTypeGenerator = new UserItemTypeGenerator(accountProvider);
     }
 }
Exemple #4
0
        protected override void ConfigureObjectCollector()
        {
            if (this.ObjectCollector == null)
            {
                var wmiProvider     = new WmiDataProvider(((FileConnectionProvider)ConnectionProvider).ConnectionScope);
                var accountProvider = new WindowsUsersProvider(wmiProvider, this.TargetInfo);

                ObjectCollector = new UserObjectCollector(accountProvider);
                if (ItemTypeGenerator == null)
                {
                    ItemTypeGenerator = new UserItemTypeGenerator(accountProvider);
                }
            }
        }