Class: TestOLEVARIABLE
- Inherits:
-
RUNIT::TestCase
- Object
- RUNIT::TestCase
- TestOLEVARIABLE
show all
- Includes:
- OLESERVER
- Defined in:
- tests/testOLEVARIABLE.rb
Constant Summary
Constants included
from OLESERVER
OLESERVER::MS_EXCEL_TYPELIB, OLESERVER::MS_XML_TYPELIB
Instance Method Summary
collapse
Instance Method Details
#test_name ⇒ Object
10
11
12
13
14
15
16
|
# File 'tests/testOLEVARIABLE.rb', line 10
def test_name
classes = WIN32OLE_TYPE.ole_classes(MS_EXCEL_TYPELIB)
chart = classes.find {|c| c.name == 'XlChartType'}
var_names = chart.variables.collect {|m| m.name}
assert(var_names.size > 0)
assert(var_names.include?('xl3DColumn'))
end
|
#test_ole_type ⇒ Object
24
25
26
27
28
29
|
# File 'tests/testOLEVARIABLE.rb', line 24
def test_ole_type
classes = WIN32OLE_TYPE.ole_classes(MS_EXCEL_TYPELIB)
chart = classes.find {|c| c.name == 'XlChartType'}
var = chart.variables.find {|m| m.name == 'xl3DColumn'}
assert_equal('INT', var.ole_type)
end
|
#test_ole_type_detail ⇒ Object
30
31
32
33
34
35
|
# File 'tests/testOLEVARIABLE.rb', line 30
def test_ole_type_detail
classes = WIN32OLE_TYPE.ole_classes(MS_EXCEL_TYPELIB)
chart = classes.find {|c| c.name == 'XlChartType'}
var = chart.variables.find {|m| m.name == 'xl3DColumn'}
assert_equal(['INT'], var.ole_type_detail)
end
|
#test_to_s ⇒ Object
17
18
19
20
21
22
23
|
# File 'tests/testOLEVARIABLE.rb', line 17
def test_to_s
classes = WIN32OLE_TYPE.ole_classes(MS_EXCEL_TYPELIB)
chart = classes.find {|c| c.name == 'XlChartType'}
var_names = chart.variables.collect {|m| "#{m}"}
assert(var_names.size > 0)
assert(var_names.include?('xl3DColumn'))
end
|
#test_value ⇒ Object
37
38
39
40
41
42
|
# File 'tests/testOLEVARIABLE.rb', line 37
def test_value
classes = WIN32OLE_TYPE.ole_classes(MS_EXCEL_TYPELIB)
chart = classes.find {|c| c.name == 'XlChartType'}
var = chart.variables.find {|m| m.name == 'xl3DColumn'}
assert_equal(-4100, var.value)
end
|
#test_visible ⇒ Object
43
44
45
46
47
48
|
# File 'tests/testOLEVARIABLE.rb', line 43
def test_visible
classes = WIN32OLE_TYPE.ole_classes(MS_EXCEL_TYPELIB)
chart = classes.find {|c| c.name == 'XlChartType'}
var = chart.variables.find {|m| m.name == 'xl3DColumn'}
assert(var.visible?)
end
|