Class: ODDB::TestCyP450InteractionConnection

Inherits:
Test::Unit::TestCase
  • Object
show all
Includes:
FlexMock::TestCase
Defined in:
test/test_model/cyp450connection.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) setup



102
103
104
# File 'test/test_model/cyp450connection.rb', line 102

def setup
  @connection = ODDB::CyP450InteractionConnection.new('substance name')
end

- (Object) test_adjust_types



105
106
107
108
109
110
111
112
113
114
115
# File 'test/test_model/cyp450connection.rb', line 105

def test_adjust_types
  app = flexmock 'app'
  values = { :substance =>  'foo name' }
  app.should_receive(:substance).and_return do |param|
    assert_equal('foo name', param)
    'substance'
  end
  result = @connection.adjust_types(values, app)
  expected = { :substance =>  'substance' }
  assert_equal(expected, result)
end