Sha256: 4726f43c25daddd92522605e84b2156ca24d490450cb6fe7cded1df7f560e88b

Contents?: true

Size: 978 Bytes

Versions: 16

Compression:

Stored size: 978 Bytes

Contents

require File.expand_path("../../../test_helper", __FILE__)

class AbstractImplementerTest < Test::Unit::TestCase
  setup do
    @klass = VirtualBox::COM::AbstractImplementer
    @interface = mock("interface")
    @lib = mock("lib")
  end

  context "initialization" do
    should "make the interface accessible" do
      instance = @klass.new(@interface, @lib)
      assert_equal @interface, instance.interface
    end
  end

  context "base methods" do
    setup do
      @instance = @klass.new(@interface, @lib)
    end

    should "implement the read_property function" do
      assert_nothing_raised {
        @instance.read_property(:foo, :bar)
      }
    end

    should "implement the write_property function" do
      assert_nothing_raised {
        @instance.write_property(:foo, :bar, :opts)
      }
    end

    should "implement the call_function function" do
      assert_nothing_raised {
        @instance.call_function(:foo, [], :opts)
      }
    end
  end
end

Version data entries

16 entries across 16 versions & 3 rubygems

Version Path
virtualbox-0.9.2 test/virtualbox/com/abstract_implementer_test.rb
virtualbox-0.9.1 test/virtualbox/com/abstract_implementer_test.rb
virtualbox-0.9.0 test/virtualbox/com/abstract_implementer_test.rb
virtualbox-0.8.6 test/virtualbox/com/abstract_implementer_test.rb
virtualbox-0.8.5 test/virtualbox/com/abstract_implementer_test.rb
virtualbox-0.8.4 test/virtualbox/com/abstract_implementer_test.rb
velir_virtualbox-0.8.4 test/virtualbox/com/abstract_implementer_test.rb
virtualbox-0.8.3 test/virtualbox/com/abstract_implementer_test.rb
virtualbox-0.8.2 test/virtualbox/com/abstract_implementer_test.rb
virtualbox-0.8.1 test/virtualbox/com/abstract_implementer_test.rb
virtualbox-0.8.0 test/virtualbox/com/abstract_implementer_test.rb
virtualbox-0.7.9 test/virtualbox/com/abstract_implementer_test.rb
virtualbox-0.7.8 test/virtualbox/com/abstract_implementer_test.rb
virtualbox-0.7.7 test/virtualbox/com/abstract_implementer_test.rb
virtualbox-0.7.6 test/virtualbox/com/abstract_implementer_test.rb
bbrowning-virtualbox-0.7.6.dev test/virtualbox/com/abstract_implementer_test.rb