Class: ODDB::OdbaExporter::TestAcpricealgExfactoryLine

Inherits:
Test::Unit::TestCase
  • Object
show all
Includes:
FlexMock::TestCase
Defined in:
ext/export/test/test_oddbdat.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) test_structure



314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
# File 'ext/export/test/test_oddbdat.rb', line 314

def test_structure
  package = ODDB::Package.new('12')
  flexstub(package).should_receive(:oid).and_return(123)
  package.price_exfactory = 123.45
  flexstub(Date).should_receive(:"today.strftime").and_return('20110203000000')
  @acpriceline = AcpricealgExfactoryLine.new(package)
  expected = {
    1=>"07", 
    2=>"20110203000000", 
    3=>123, 
    4=>"PSL1",
    5=>"4", 
    6=>"123.45", 
  }
  assert_equal(expected.sort, @acpriceline.structure.sort)
end