# Path: ice/consoles.py
# def console_roms_directory(configuration, console):
# def path_is_rom(console, path):
# 
# Path: ice/model.py
# ROM = collections.namedtuple('ROM', [
#   'name',
#   'path',
#   'console',
# ])


import unittest
from mockito import *
from nose_parameterized import parameterized
from ice import consoles
from ice import model
from testinfra import fixtures





class ConsolesTests(unittest.TestCase):

  @parameterized.expand([
    # NES has no custom image directory set, so it should use the default
    (fixtures.consoles.nes, '/roms/', '/roms/NES'),
    # SNES, on the other hand, does, so we should use the provided one
    (fixtures.consoles.snes, '/roms/', '/external/consoles/roms/snes'),
  ])
  def test_console_roms_directory(self, console, config_path, expected):
    config = mock()
    config.roms_directory = config_path
    self.assertEqual(consoles.console_roms_directory(config, console), expected)

  @parameterized.expand([
    # No extensions passes everything

# Path: ice/consoles.py
# def console_roms_directory(configuration, console):
# def path_is_rom(console, path):
# 
# Path: ice/model.py
# ROM = collections.namedtuple('ROM', [
#   'name',
#   'path',
#   'console',
# ])


# Path: tests/consoles_tests.py
import unittest
from mockito import *
from nose_parameterized import parameterized
from ice import consoles
from ice import model
from testinfra import fixtures






class ConsolesTests(unittest.TestCase):

  @parameterized.expand([
    # NES has no custom image directory set, so it should use the default
    (fixtures.consoles.nes, '/roms/', '/roms/NES'),
    # SNES, on the other hand, does, so we should use the provided one
    (fixtures.consoles.snes, '/roms/', '/external/consoles/roms/snes'),
  ])
  def test_console_roms_directory(self, console, config_path, expected):
    config = mock()
    config.roms_directory = config_path
    self.assertEqual(consoles.console_roms_directory(config, console), expected)

  @parameterized.expand([
    # No extensions passes everything

    ("", "/Games/rom.txt", True),