Class: ODDB::OdbaExporter::TestAcOddbTable

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_lines



616
617
618
619
620
621
622
623
624
625
626
# File 'ext/export/test/test_oddbdat.rb', line 616

def test_lines
  # test package.pharmacode nil case
  package = ODDB::Package.new('12')
  @acoddbtable = AcOddbTable.new
  assert_equal([], @acoddbtable.lines(package))

  # test not nil case
  package.pharmacode = 123
  flexstub(AcOddbLine).should_receive(:new).and_return('acoddbline')
  assert_equal(['acoddbline'], @acoddbtable.lines(package))
end