 Q = require 'q'
-_ = require('underscore')._
+_ = require 'lodash-node'
 Config = require '../config'
 ProductImport = require('../lib/import/productimport')
 {ProductImportLogger} = require '../lib/loggers'

      expect(result).toBe true
      done()

  it 'should fetch product types', (done) ->
    spyOn(@importer.rest, 'GET').andCallFake (options, callback) -> callback(null, {statusCode: 200}, {foo: 'bar'})
    @importer._fetchProductTypes()
    .then (result) =>

  afterEach ->
    @importer = null

  xit 'should initialize', ->
    expect(@importer).toBeDefined()
    expect(@importer._options.source).toBe '/sourcepath'
    expect(@importer._options.mapping).toBe '/mappingpath'

  xit 'should throw error if source path is not given', ->
    expect(-> new ProductImport).toThrow new Error 'XML source path is required'

  xit 'should throw error if mapping path is not given', ->
    options = _.extend _.clone(Config), source: '/sourcepath'
    expect(-> new ProductImport options).toThrow new Error 'Product import attributes mapping (Brickfox -> SPHERE) file path is required'

  xit 'should execute', (done) ->
    createMock = ->
      d = Q.defer()
      d.resolve 'Resolved'
