private void AssertGeneratedWmiItem(ItemType[] itemToAssert, string expectedNamespace, string expectedWql)
 {
     ItemTypeChecker.DoBasicAssertForItems(itemToAssert, 1, typeof(wmi_item));
     var wmiItemToAssert = (wmi_item)itemToAssert.Single();
     ItemTypeEntityChecker.AssertItemTypeEntity(wmiItemToAssert.@namespace, expectedNamespace);
     ItemTypeEntityChecker.AssertItemTypeEntity(wmiItemToAssert.wql, expectedWql);
 }
        private void AssertFileItem(ItemType[] itemsToAssert, string expectedPath, string expectedFilename, bool filepathMustBeNull)
        {
            ItemTypeChecker.DoBasicAssertForItems(itemsToAssert, 1, TypeOfUnixFileItem);
            
            var fileItemToAssert = (OVAL.SystemCharacteristics.Unix.file_item)itemsToAssert.Single();

            if (filepathMustBeNull)
            {
                Assert.IsNull(fileItemToAssert.filepath);
                ItemTypeEntityChecker.AssertItemTypeEntity(fileItemToAssert.path, expectedPath);
                if (!string.IsNullOrEmpty(expectedFilename))
                    ItemTypeEntityChecker.AssertItemTypeEntity(fileItemToAssert.filename, expectedFilename);
            }
            else
            {
                var expectedFilepath = string.Format("{0}{1}", expectedPath, expectedFilename);
                ItemTypeEntityChecker.AssertItemTypeEntity(fileItemToAssert.filepath, expectedFilepath);
                Assert.AreEqual(String.Empty, fileItemToAssert.path.Value);
                Assert.AreEqual(String.Empty, fileItemToAssert.filename.Value);
                
            }
        }