Sha256: 3993410c47446369e7dff18594369d31952dbde700fcfe35c594000ab4ffb21a

Contents?: true

Size: 988 Bytes

Versions: 6

Compression:

Stored size: 988 Bytes

Contents

require File.join(File.dirname(__FILE__), '..', '..', 'test_helper')

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

6 entries across 6 versions & 1 rubygems

Version Path
virtualbox-0.7.5 test/virtualbox/com/abstract_implementer_test.rb
virtualbox-0.7.4 test/virtualbox/com/abstract_implementer_test.rb
virtualbox-0.7.3 test/virtualbox/com/abstract_implementer_test.rb
virtualbox-0.7.2 test/virtualbox/com/abstract_implementer_test.rb
virtualbox-0.7.1 test/virtualbox/com/abstract_implementer_test.rb
virtualbox-0.7.0 test/virtualbox/com/abstract_implementer_test.rb