8 if defined?(WIN32OLE::Method)
9 require_relative 'available_ole'
10 class TestWIN32OLE_METHOD_EVENT < Test::Unit::TestCase
11 unless AvailableOLE.sysmon_available?
12 def test_dummy_for_skip_message
13 omit 'System Monitor Control is not available'
17 ole_type = WIN32OLE::Type.new('System Monitor Control', 'SystemMonitor')
18 @on_dbl_click = WIN32OLE::Method.new(ole_type, 'OnDblClick')
19 ole_type = WIN32OLE::Type.new('Microsoft Shell Controls And Automation', 'Shell')
20 @namespace = WIN32OLE::Method.new(ole_type, 'namespace')
24 assert(@on_dbl_click.event?)
27 def test_event_interface
28 assert('DISystemMonitorEvents', @on_dbl_click.event_interface)
31 def test_event_interface_is_nil
32 assert_equal(nil, @namespace.event_interface)