# Path: dtformats/amcache.py
# class WindowsAMCacheFile(data_format.BinaryDataFile):
#   _APPLICATION_KEY_DESCRIPTIONS = {
#       'ProgramId': 'Program identifier',
#       'ProgramInstanceId': 'Program instance identifier'}
#   _APPLICATION_FILE_KEY_DESCRIPTIONS = {}
#   _FILE_REFERENCE_KEY_DESCRIPTIONS = {
#       '0': 'Product name',
#       '1': 'Company name',
#       '3': 'Language code',
#       '5': 'File version',
#       '6': 'File size',
#       '7': 'PE/COFF image size',
#       '9': 'PE/COFF checksum',
#       'c': 'File description',
#       'd': 'PE/COFF image version',
#       'f': 'PE/COFF compilation time',
#       '11': 'File modification time',
#       '12': 'File creation time',
#       '15': 'Path',
#       '100': 'Program identifier',
#       '101': 'SHA-1'}
#   _PROGRAM_KEY_DESCRIPTIONS = {
#       '0': 'Name',
#       '1': 'Version',
#       '2': 'Publisher',
#       '3': 'Language code',
#       '6': 'Installation method',
#       '7': 'Uninstallation key paths',
#       'a': 'Installation time',
#       'b': 'Uninstallation time',
#       'd': 'Installation directories',
#       'Files': 'File reference key identifiers'}
#   _ROOT_KEY_NAMES = frozenset([
#       '{11517b7c-e79d-4e20-961b-75a811715add}',
#       '{356c48f6-2fee-e7ef-2a64-39f59ec3be22}'])
#   def _GetValueDataAsObject(self, value):
#   def _ReadApplicationFileKey(self, application_file_key):
#   def _ReadApplicationKey(self, application_key):
#   def _ReadFileKey(self, file_key):
#   def _ReadFileReferenceKey(self, file_reference_key):
#   def _ReadInventoryApplicationFileKey(self, inventory_application_file_key):
#   def _ReadInventoryApplicationKey(self, inventory_application_key):
#   def _ReadProgramKey(self, program_key):
#   def _ReadProgramsKey(self, programs_key):
#   def ReadFileObject(self, file_object):
# 
# Path: tests/test_lib.py
# class BaseTestCase(unittest.TestCase):
# class TestOutputWriter(output_writers.OutputWriter):
#   _TEST_DATA_PATH = os.path.join(os.getcwd(), 'test_data')
#   def _GetTestFilePath(self, path_segments):
#   def _SkipIfPathNotExists(self, path):
#   def __init__(self):
#   def Close(self):
#   def Open(self):
#   def WriteText(self, text):


import unittest
from dtformats import amcache
from tests import test_lib
# -*- coding: utf-8 -*-
"""Tests for Windows AMCache (AMCache.hve) files."""





class WindowsAMCacheFileTest(test_lib.BaseTestCase):
  """Windows AMCache (AMCache.hve) file tests."""

  # pylint: disable=protected-access

  # TODO: add test for _ReadFileKey
  # TODO: add test for _ReadFileReferenceKey

  def testReadFileObject(self):
    """Tests the ReadFileObject function."""
    test_file_path = self._GetTestFilePath(['Amcache.hve'])
    self._SkipIfPathNotExists(test_file_path)


# Path: dtformats/amcache.py
# class WindowsAMCacheFile(data_format.BinaryDataFile):
#   _APPLICATION_KEY_DESCRIPTIONS = {
#       'ProgramId': 'Program identifier',
#       'ProgramInstanceId': 'Program instance identifier'}
#   _APPLICATION_FILE_KEY_DESCRIPTIONS = {}
#   _FILE_REFERENCE_KEY_DESCRIPTIONS = {
#       '0': 'Product name',
#       '1': 'Company name',
#       '3': 'Language code',
#       '5': 'File version',
#       '6': 'File size',
#       '7': 'PE/COFF image size',
#       '9': 'PE/COFF checksum',
#       'c': 'File description',
#       'd': 'PE/COFF image version',
#       'f': 'PE/COFF compilation time',
#       '11': 'File modification time',
#       '12': 'File creation time',
#       '15': 'Path',
#       '100': 'Program identifier',
#       '101': 'SHA-1'}
#   _PROGRAM_KEY_DESCRIPTIONS = {
#       '0': 'Name',
#       '1': 'Version',
#       '2': 'Publisher',
#       '3': 'Language code',
#       '6': 'Installation method',
#       '7': 'Uninstallation key paths',
#       'a': 'Installation time',
#       'b': 'Uninstallation time',
#       'd': 'Installation directories',
#       'Files': 'File reference key identifiers'}
#   _ROOT_KEY_NAMES = frozenset([
#       '{11517b7c-e79d-4e20-961b-75a811715add}',
#       '{356c48f6-2fee-e7ef-2a64-39f59ec3be22}'])
#   def _GetValueDataAsObject(self, value):
#   def _ReadApplicationFileKey(self, application_file_key):
#   def _ReadApplicationKey(self, application_key):
#   def _ReadFileKey(self, file_key):
#   def _ReadFileReferenceKey(self, file_reference_key):
#   def _ReadInventoryApplicationFileKey(self, inventory_application_file_key):
#   def _ReadInventoryApplicationKey(self, inventory_application_key):
#   def _ReadProgramKey(self, program_key):
#   def _ReadProgramsKey(self, programs_key):
#   def ReadFileObject(self, file_object):
# 
# Path: tests/test_lib.py
# class BaseTestCase(unittest.TestCase):
# class TestOutputWriter(output_writers.OutputWriter):
#   _TEST_DATA_PATH = os.path.join(os.getcwd(), 'test_data')
#   def _GetTestFilePath(self, path_segments):
#   def _SkipIfPathNotExists(self, path):
#   def __init__(self):
#   def Close(self):
#   def Open(self):
#   def WriteText(self, text):


# Path: tests/amcache.py
import unittest
from dtformats import amcache
from tests import test_lib

# -*- coding: utf-8 -*-
"""Tests for Windows AMCache (AMCache.hve) files."""





class WindowsAMCacheFileTest(test_lib.BaseTestCase):
  """Windows AMCache (AMCache.hve) file tests."""

  # pylint: disable=protected-access

  # TODO: add test for _ReadFileKey
  # TODO: add test for _ReadFileReferenceKey

  def testReadFileObject(self):
    """Tests the ReadFileObject function."""
    test_file_path = self._GetTestFilePath(['Amcache.hve'])
    self._SkipIfPathNotExists(test_file_path)


    output_writer = test_lib.TestOutputWriter()