win32-service 0.7.0-x86-mswin32-60 → 0.7.1-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,86 +1,97 @@
1
- #######################################################################
2
- # test_win32_service_configure.rb
3
- #
4
- # Test suite that validates the Service.configure method.
5
- #######################################################################
6
- require 'rubygems'
7
- gem 'test-unit'
8
-
9
- require 'win32/service'
10
- require 'test/unit'
11
-
12
- class TC_Service_Configure < Test::Unit::TestCase
13
- def self.startup
14
- @@service = "notepad_service"
15
- @@command = "C:\\windows\\system32\\notepad.exe"
16
-
17
- Win32::Service.new(
18
- :service_name => @@service,
19
- :binary_path_name => @@command
20
- )
21
- end
22
-
23
- def config_info
24
- Win32::Service.config_info(@@service)
25
- end
26
-
27
- def full_info
28
- service = nil
29
- Win32::Service.services{ |s|
30
- if s.service_name == @@service
31
- service = s
32
- break
33
- end
34
- }
35
- service
36
- end
37
-
38
- def service_configure(opt)
39
- options = {:service_name => @@service}
40
- options = options.merge(opt)
41
- assert_nothing_raised{ Win32::Service.configure(options) }
42
- end
43
-
44
- def setup
45
- @info = Win32::Service.config_info(@@service)
46
- end
47
-
48
- def test_service_configure_basic
49
- assert_respond_to(Win32::Service, :configure)
50
- end
51
-
52
- def test_service_type
53
- assert_equal('own process, interactive', config_info.service_type)
54
- service_configure(:service_type => Win32::Service::WIN32_SHARE_PROCESS)
55
- assert_equal('share process', config_info.service_type)
56
- end
57
-
58
- def test_description
59
- assert_equal('', full_info.description)
60
- service_configure(:description => 'test service')
61
- assert_equal('test service', full_info.description)
62
- end
63
-
64
- def test_start_type
65
- assert_equal('demand start', config_info.start_type)
66
- service_configure(:start_type => Win32::Service::DISABLED)
67
- assert_equal('disabled', config_info.start_type)
68
- end
69
-
70
- def test_service_configure_expected_errors
71
- assert_raise(ArgumentError){ Win32::Service.configure }
72
- assert_raise(ArgumentError){ Win32::Service.configure('bogus') }
73
- assert_raise(ArgumentError){ Win32::Service.configure({}) }
74
- assert_raise(ArgumentError){ Win32::Service.configure(:binary_path_name => 'notepad.exe') }
75
- end
76
-
77
- def teardown
78
- @info = nil
79
- end
80
-
81
- def self.shutdown
82
- Win32::Service.delete(@@service) if Win32::Service.exists?(@@service)
83
- @@service = nil
84
- @@command = nil
85
- end
86
- end
1
+ #######################################################################
2
+ # test_win32_service_configure.rb
3
+ #
4
+ # Test suite that validates the Service.configure method.
5
+ #######################################################################
6
+ require 'rubygems'
7
+ gem 'test-unit'
8
+
9
+ require 'win32/service'
10
+ require 'test/unit'
11
+
12
+ class TC_Win32_Service_Configure < Test::Unit::TestCase
13
+ def self.startup
14
+ @@service = "notepad_service"
15
+ @@command = "C:\\windows\\system32\\notepad.exe"
16
+
17
+ Win32::Service.new(
18
+ :service_name => @@service,
19
+ :binary_path_name => @@command
20
+ )
21
+ end
22
+
23
+ def config_info
24
+ Win32::Service.config_info(@@service)
25
+ end
26
+
27
+ def full_info
28
+ service = nil
29
+ Win32::Service.services{ |s|
30
+ if s.service_name == @@service
31
+ service = s
32
+ break
33
+ end
34
+ }
35
+ service
36
+ end
37
+
38
+ def service_configure(opt)
39
+ options = {:service_name => @@service}
40
+ options = options.merge(opt)
41
+ assert_nothing_raised{ Win32::Service.configure(options) }
42
+ end
43
+
44
+ def setup
45
+ @info = Win32::Service.config_info(@@service)
46
+ end
47
+
48
+ test "configure method is defined" do
49
+ assert_respond_to(Win32::Service, :configure)
50
+ end
51
+
52
+ test "configuring the service type works as expected" do
53
+ assert_equal('own process, interactive', config_info.service_type)
54
+ service_configure(:service_type => Win32::Service::WIN32_SHARE_PROCESS)
55
+ assert_equal('share process', config_info.service_type)
56
+ end
57
+
58
+ test "configuring the description works as expected" do
59
+ assert_equal('', full_info.description)
60
+ service_configure(:description => 'test service')
61
+ assert_equal('test service', full_info.description)
62
+ end
63
+
64
+ test "configuring the start type works as expected" do
65
+ assert_equal('demand start', config_info.start_type)
66
+ service_configure(:start_type => Win32::Service::DISABLED)
67
+ assert_equal('disabled', config_info.start_type)
68
+ end
69
+
70
+ test "the configure method requires one argument" do
71
+ assert_raise(ArgumentError){ Win32::Service.configure }
72
+ end
73
+
74
+ test "the configure method requires a hash argument" do
75
+ assert_raise(ArgumentError){ Win32::Service.configure('bogus') }
76
+ end
77
+
78
+ test "the hash argument must not be empty" do
79
+ assert_raise(ArgumentError){ Win32::Service.configure({}) }
80
+ end
81
+
82
+ test "the service name must be provided or an error is raised" do
83
+ assert_raise(ArgumentError){
84
+ Win32::Service.configure(:binary_path_name => 'notepad.exe')
85
+ }
86
+ end
87
+
88
+ def teardown
89
+ @info = nil
90
+ end
91
+
92
+ def self.shutdown
93
+ Win32::Service.delete(@@service) if Win32::Service.exists?(@@service)
94
+ @@service = nil
95
+ @@command = nil
96
+ end
97
+ end
@@ -1,103 +1,131 @@
1
- ########################################################################
2
- # tc_service_create.rb
3
- #
4
- # Test case for the Service.create method. This test case will create
5
- # a dummy (notepad) service. It won't actually run of course.
6
- ########################################################################
7
- require 'rubygems'
8
- gem 'test-unit'
9
-
10
- require 'win32/service'
11
- require 'test/unit'
12
-
13
- class TC_Service_Create < Test::Unit::TestCase
14
- def self.startup
15
- @@service1 = "notepad_service1"
16
- @@service2 = "notepad_service2"
17
- @@command = "C:\\windows\\system32\\notepad.exe"
18
-
19
- Win32::Service.new(
20
- :service_name => @@service1,
21
- :binary_path_name => @@command
22
- )
23
-
24
- Win32::Service.new(
25
- :service_name => @@service2,
26
- :display_name => 'Notepad Test',
27
- :desired_access => Win32::Service::ALL_ACCESS,
28
- :service_type => Win32::Service::WIN32_OWN_PROCESS,
29
- :start_type => Win32::Service::DISABLED,
30
- :error_control => Win32::Service::ERROR_IGNORE,
31
- :binary_path_name => @@command,
32
- :load_order_group => 'Network',
33
- :dependencies => 'W32Time',
34
- :description => 'Test service. Please delete me'
35
- )
36
- end
37
-
38
- def setup
39
- @info1 = Win32::Service.config_info(@@service1)
40
- @info2 = Win32::Service.config_info(@@service2)
41
- end
42
-
43
- def test_new_basic
44
- assert_respond_to(Win32::Service, :new)
45
- end
46
-
47
- def test_create_alias
48
- assert_respond_to(Win32::Service, :create)
49
- assert_equal(Win32::Service.method(:create), Win32::Service.method(:new))
50
- end
51
-
52
- # Sanity test to ensure the services were actually created. If this test
53
- # fails, the results for other tests are meaningless.
54
- #
55
- def test_service_created
56
- assert_true(Win32::Service.exists?(@@service1))
57
- assert_true(Win32::Service.exists?(@@service2))
58
- end
59
-
60
- def test_service_configuration_info
61
- assert_equal('own process, interactive', @info1.service_type)
62
- assert_equal('demand start', @info1.start_type)
63
- assert_equal('normal', @info1.error_control)
64
- assert_equal(@@command, @info1.binary_path_name)
65
- assert_equal('', @info1.load_order_group)
66
- assert_equal(0, @info1.tag_id)
67
- assert_equal([], @info1.dependencies)
68
- assert_equal('LocalSystem', @info1.service_start_name)
69
- assert_equal('notepad_service1', @info1.display_name)
70
- end
71
-
72
- def test_service_configuration_info_multiple_options
73
- assert_equal('own process', @info2.service_type)
74
- assert_equal('disabled', @info2.start_type)
75
- assert_equal('ignore', @info2.error_control)
76
- assert_equal(@@command, @info2.binary_path_name)
77
- assert_equal('Network', @info2.load_order_group)
78
- assert_equal(0, @info2.tag_id)
79
- assert_equal(['W32Time'], @info2.dependencies)
80
- assert_equal('LocalSystem', @info2.service_start_name)
81
- assert_equal('Notepad Test', @info2.display_name)
82
- end
83
-
84
- def test_create_expected_errors
85
- assert_raise(ArgumentError){ Win32::Service.new }
86
- assert_raise(ArgumentError){ Win32::Service.new(:binary_path_name => 'test.exe') }
87
- assert_raise(ArgumentError){ Win32::Service.new(:bogus => 'test.exe') }
88
- end
89
-
90
- def teardown
91
- @info1 = nil
92
- @info2 = nil
93
- end
94
-
95
- def self.shutdown
96
- Win32::Service.delete(@@service1) if Win32::Service.exists?(@@service1)
97
- Win32::Service.delete(@@service2) if Win32::Service.exists?(@@service2)
98
-
99
- @@service1 = nil
100
- @@service2 = nil
101
- @@command = nil
102
- end
103
- end
1
+ ########################################################################
2
+ # test_win32_service_create.rb
3
+ #
4
+ # Test case for the Service.create method. This test case will create
5
+ # a dummy (notepad) service. It won't actually run of course.
6
+ ########################################################################
7
+ require 'rubygems'
8
+ gem 'test-unit'
9
+
10
+ require 'win32/service'
11
+ require 'test/unit'
12
+
13
+ class TC_Win32_Service_Create < Test::Unit::TestCase
14
+ def self.startup
15
+ @@service1 = "notepad_service1"
16
+ @@service2 = "notepad_service2"
17
+ @@command = "C:\\windows\\system32\\notepad.exe"
18
+
19
+ Win32::Service.new(
20
+ :service_name => @@service1,
21
+ :binary_path_name => @@command
22
+ )
23
+
24
+ Win32::Service.new(
25
+ :service_name => @@service2,
26
+ :display_name => 'Notepad Test',
27
+ :desired_access => Win32::Service::ALL_ACCESS,
28
+ :service_type => Win32::Service::WIN32_OWN_PROCESS,
29
+ :start_type => Win32::Service::DISABLED,
30
+ :error_control => Win32::Service::ERROR_IGNORE,
31
+ :binary_path_name => @@command,
32
+ :load_order_group => 'Network',
33
+ :dependencies => 'W32Time',
34
+ :description => 'Test service. Please delete me'
35
+ )
36
+ end
37
+
38
+ def setup
39
+ @info1 = Win32::Service.config_info(@@service1)
40
+ @info2 = Win32::Service.config_info(@@service2)
41
+ end
42
+
43
+ test "constructor basic functionality" do
44
+ assert_respond_to(Win32::Service, :new)
45
+ end
46
+
47
+ test "create is an alias for new" do
48
+ assert_respond_to(Win32::Service, :create)
49
+ assert_alias_method(Win32::Service, :create, :new)
50
+ end
51
+
52
+ test "ensure services were created in startup method" do
53
+ notify "If this test fails then remaining results are meaningless."
54
+ assert_true(Win32::Service.exists?(@@service1))
55
+ assert_true(Win32::Service.exists?(@@service2))
56
+ end
57
+
58
+ test "expected service type configuration information" do
59
+ assert_equal('own process, interactive', @info1.service_type)
60
+ end
61
+
62
+ test "expected start type configuration information" do
63
+ assert_equal('demand start', @info1.start_type)
64
+ end
65
+
66
+ test "expected error control configuration information" do
67
+ assert_equal('normal', @info1.error_control)
68
+ end
69
+
70
+ test "expected binary path name configuration information" do
71
+ assert_equal(@@command, @info1.binary_path_name)
72
+ end
73
+
74
+ test "expected load order group configuration information" do
75
+ assert_equal('', @info1.load_order_group)
76
+ end
77
+
78
+ test "expected tag id configuration information" do
79
+ assert_equal(0, @info1.tag_id)
80
+ end
81
+
82
+ test "expected dependency configuration information" do
83
+ assert_equal([], @info1.dependencies)
84
+ end
85
+
86
+ test "expected service start time configuration information" do
87
+ assert_equal('LocalSystem', @info1.service_start_name)
88
+ end
89
+
90
+ test "expected display name configuration information" do
91
+ assert_equal('notepad_service1', @info1.display_name)
92
+ end
93
+
94
+ test "configuration information options are set properly for service 2" do
95
+ assert_equal('own process', @info2.service_type)
96
+ assert_equal('disabled', @info2.start_type)
97
+ assert_equal('ignore', @info2.error_control)
98
+ assert_equal(@@command, @info2.binary_path_name)
99
+ assert_equal('Network', @info2.load_order_group)
100
+ assert_equal(0, @info2.tag_id)
101
+ assert_equal(['W32Time'], @info2.dependencies)
102
+ assert_equal('LocalSystem', @info2.service_start_name)
103
+ assert_equal('Notepad Test', @info2.display_name)
104
+ end
105
+
106
+ test "at least one argument is required or an error is raised" do
107
+ assert_raise(ArgumentError){ Win32::Service.new }
108
+ end
109
+
110
+ test "passing a bogus option to the constructor will cause an error" do
111
+ assert_raise(ArgumentError){ Win32::Service.new(:bogus => 'test.exe') }
112
+ end
113
+
114
+ test "the service name must be provided or an error is raised" do
115
+ assert_raise(ArgumentError){ Win32::Service.new(:binary_path_name => 'test.exe') }
116
+ end
117
+
118
+ def teardown
119
+ @info1 = nil
120
+ @info2 = nil
121
+ end
122
+
123
+ def self.shutdown
124
+ Win32::Service.delete(@@service1) if Win32::Service.exists?(@@service1)
125
+ Win32::Service.delete(@@service2) if Win32::Service.exists?(@@service2)
126
+
127
+ @@service1 = nil
128
+ @@service2 = nil
129
+ @@command = nil
130
+ end
131
+ end
@@ -1,179 +1,184 @@
1
- ########################################################################
2
- # tc_service_info.rb
3
- #
4
- # Test case for the Struct::ServiceInfo structure.
5
- ########################################################################
6
- require 'rubygems'
7
- gem 'test-unit'
8
-
9
- require 'win32/service'
10
- require 'test/unit'
11
-
12
- class TC_Struct_ServiceInfo < Test::Unit::TestCase
13
- def self.startup
14
- @@services = Win32::Service.services
15
- end
16
-
17
- def setup
18
- @service_info = @@services[0]
19
-
20
- @error_controls = [
21
- 'critical',
22
- 'ignore',
23
- 'normal',
24
- 'severe',
25
- nil
26
- ]
27
-
28
- @start_types = [
29
- 'auto start',
30
- 'boot start',
31
- 'demand start',
32
- 'disabled',
33
- 'system start',
34
- nil
35
- ]
36
-
37
- @types = [
38
- 'file system driver',
39
- 'kernel driver',
40
- 'own process',
41
- 'share process',
42
- 'recognizer token',
43
- 'driver',
44
- 'win32',
45
- 'all',
46
- 'own process, interactive',
47
- 'share process, interactive',
48
- nil
49
- ]
50
-
51
- @states = [
52
- 'continue pending',
53
- 'pause pending',
54
- 'paused',
55
- 'running',
56
- 'start pending',
57
- 'stop pending',
58
- 'stopped',
59
- nil
60
- ]
61
-
62
- @controls = [
63
- 'netbind change',
64
- 'param change',
65
- 'pause continue',
66
- 'shutdown',
67
- 'stop',
68
- 'hardware profile change',
69
- 'power event',
70
- 'session change',
71
- nil
72
- ]
73
- end
74
-
75
- def test_service_info_info_service_name
76
- assert_respond_to(@service_info, :service_name)
77
- assert_kind_of(String, @service_info.service_name)
78
- end
79
-
80
- def test_service_info_info_display_name
81
- assert_respond_to(@service_info, :display_name)
82
- assert_kind_of(String, @service_info.display_name)
83
- end
84
-
85
- def test_service_info_info_service_type
86
- assert_respond_to(@service_info, :service_type)
87
- assert(@types.include?(@service_info.service_type))
88
- end
89
-
90
- def test_service_info_current_state
91
- assert_respond_to(@service_info, :current_state)
92
- assert(@states.include?(@service_info.current_state))
93
- end
94
-
95
- def test_service_info_controls_accepted
96
- assert_respond_to(@service_info, :controls_accepted)
97
- assert(@controls.include?(@service_info.controls_accepted))
98
- end
99
-
100
- def test_service_info_win32_exit_code
101
- assert_respond_to(@service_info, :win32_exit_code)
102
- assert_kind_of(Fixnum, @service_info.win32_exit_code)
103
- end
104
-
105
- def test_service_info_service_specific_exit_code
106
- assert_respond_to(@service_info, :service_specific_exit_code)
107
- assert_kind_of(Fixnum, @service_info.service_specific_exit_code)
108
- end
109
-
110
- def test_service_info_check_point
111
- assert_respond_to(@service_info, :check_point)
112
- assert_kind_of(Fixnum, @service_info.check_point)
113
- end
114
-
115
- def test_service_info_wait_hint
116
- assert_respond_to(@service_info, :wait_hint)
117
- assert_kind_of(Fixnum, @service_info.wait_hint)
118
- end
119
-
120
- def test_service_info_binary_path_name
121
- assert_respond_to(@service_info, :binary_path_name)
122
- assert_kind_of(String, @service_info.binary_path_name)
123
- end
124
-
125
- def test_service_info_start_type
126
- assert_respond_to(@service_info, :start_type)
127
- assert(@start_types.include?(@service_info.start_type))
128
- end
129
-
130
- def test_service_info_error_control
131
- assert_respond_to(@service_info, :error_control)
132
- assert(@error_controls.include?(@service_info.error_control))
133
- end
134
-
135
- def test_service_info_load_order_group
136
- assert_respond_to(@service_info, :load_order_group)
137
- assert_kind_of(String, @service_info.load_order_group)
138
- end
139
-
140
- def test_service_info_tag_id
141
- assert_respond_to(@service_info, :tag_id)
142
- assert_kind_of(Fixnum, @service_info.tag_id)
143
- end
144
-
145
- def test_service_info_start_name
146
- assert_respond_to(@service_info, :start_name)
147
- assert_kind_of(String, @service_info.start_name)
148
- end
149
-
150
- def test_service_info_dependencies
151
- assert_respond_to(@service_info, :dependencies)
152
- assert_kind_of(Array, @service_info.dependencies)
153
- end
154
-
155
- def test_service_info_description
156
- assert_respond_to(@service_info, :description)
157
- assert_kind_of(String, @service_info.description)
158
- end
159
-
160
- def test_service_info_interactive
161
- assert_respond_to(@service_info, :interactive)
162
- assert([true, false].include?(@service_info.interactive))
163
- end
164
-
165
- def test_service_info_service_flags
166
- assert_respond_to(@service_info, :service_flags)
167
- assert([0,1].include?(@service_info.service_flags))
168
- end
169
-
170
- def teardown
171
- @types = nil
172
- @states = nil
173
- @controls = nil
174
- end
175
-
176
- def self.shutdown
177
- @@services = nil
178
- end
179
- end
1
+ ########################################################################
2
+ # test_win32_service_info.rb
3
+ #
4
+ # Test case for the Struct::ServiceInfo structure.
5
+ ########################################################################
6
+ require 'rubygems'
7
+ gem 'test-unit'
8
+
9
+ require 'win32/service'
10
+ require 'test/unit'
11
+
12
+ class TC_Win32_ServiceInfo_Struct < Test::Unit::TestCase
13
+ def self.startup
14
+ @@services = Win32::Service.services
15
+ end
16
+
17
+ def setup
18
+ @service_info = @@services.find{ |s| s.service_name == 'W32Time' }
19
+
20
+ @error_controls = [
21
+ 'critical',
22
+ 'ignore',
23
+ 'normal',
24
+ 'severe',
25
+ nil
26
+ ]
27
+
28
+ @start_types = [
29
+ 'auto start',
30
+ 'boot start',
31
+ 'demand start',
32
+ 'disabled',
33
+ 'system start',
34
+ nil
35
+ ]
36
+
37
+ @types = [
38
+ 'file system driver',
39
+ 'kernel driver',
40
+ 'own process',
41
+ 'share process',
42
+ 'recognizer token',
43
+ 'driver',
44
+ 'win32',
45
+ 'all',
46
+ 'own process, interactive',
47
+ 'share process, interactive',
48
+ nil
49
+ ]
50
+
51
+ @states = [
52
+ 'continue pending',
53
+ 'pause pending',
54
+ 'paused',
55
+ 'running',
56
+ 'start pending',
57
+ 'stop pending',
58
+ 'stopped',
59
+ nil
60
+ ]
61
+
62
+ @controls = [
63
+ 'netbind change',
64
+ 'param change',
65
+ 'pause continue',
66
+ 'pre-shutdown',
67
+ 'shutdown',
68
+ 'stop',
69
+ 'hardware profile change',
70
+ 'power event',
71
+ 'session change',
72
+ 'interrogate'
73
+ ]
74
+ end
75
+
76
+ def test_service_info_info_service_name
77
+ assert_respond_to(@service_info, :service_name)
78
+ assert_kind_of(String, @service_info.service_name)
79
+ end
80
+
81
+ def test_service_info_info_display_name
82
+ assert_respond_to(@service_info, :display_name)
83
+ assert_kind_of(String, @service_info.display_name)
84
+ end
85
+
86
+ def test_service_info_info_service_type
87
+ assert_respond_to(@service_info, :service_type)
88
+ assert(@types.include?(@service_info.service_type))
89
+ end
90
+
91
+ def test_service_info_current_state
92
+ assert_respond_to(@service_info, :current_state)
93
+ assert(@states.include?(@service_info.current_state))
94
+ end
95
+
96
+ def test_service_info_controls_accepted
97
+ assert_respond_to(@service_info, :controls_accepted)
98
+ assert_kind_of(Array, @service_info.controls_accepted)
99
+ assert_false(@service_info.controls_accepted.empty?)
100
+ @service_info.controls_accepted.each{ |control|
101
+ assert_true(@controls.include?(control))
102
+ }
103
+ end
104
+
105
+ def test_service_info_win32_exit_code
106
+ assert_respond_to(@service_info, :win32_exit_code)
107
+ assert_kind_of(Fixnum, @service_info.win32_exit_code)
108
+ end
109
+
110
+ def test_service_info_service_specific_exit_code
111
+ assert_respond_to(@service_info, :service_specific_exit_code)
112
+ assert_kind_of(Fixnum, @service_info.service_specific_exit_code)
113
+ end
114
+
115
+ def test_service_info_check_point
116
+ assert_respond_to(@service_info, :check_point)
117
+ assert_kind_of(Fixnum, @service_info.check_point)
118
+ end
119
+
120
+ def test_service_info_wait_hint
121
+ assert_respond_to(@service_info, :wait_hint)
122
+ assert_kind_of(Fixnum, @service_info.wait_hint)
123
+ end
124
+
125
+ def test_service_info_binary_path_name
126
+ assert_respond_to(@service_info, :binary_path_name)
127
+ assert_kind_of(String, @service_info.binary_path_name)
128
+ end
129
+
130
+ def test_service_info_start_type
131
+ assert_respond_to(@service_info, :start_type)
132
+ assert(@start_types.include?(@service_info.start_type))
133
+ end
134
+
135
+ def test_service_info_error_control
136
+ assert_respond_to(@service_info, :error_control)
137
+ assert(@error_controls.include?(@service_info.error_control))
138
+ end
139
+
140
+ def test_service_info_load_order_group
141
+ assert_respond_to(@service_info, :load_order_group)
142
+ assert_kind_of(String, @service_info.load_order_group)
143
+ end
144
+
145
+ def test_service_info_tag_id
146
+ assert_respond_to(@service_info, :tag_id)
147
+ assert_kind_of(Fixnum, @service_info.tag_id)
148
+ end
149
+
150
+ def test_service_info_start_name
151
+ assert_respond_to(@service_info, :start_name)
152
+ assert_kind_of(String, @service_info.start_name)
153
+ end
154
+
155
+ def test_service_info_dependencies
156
+ assert_respond_to(@service_info, :dependencies)
157
+ assert_kind_of(Array, @service_info.dependencies)
158
+ end
159
+
160
+ def test_service_info_description
161
+ assert_respond_to(@service_info, :description)
162
+ assert_kind_of(String, @service_info.description)
163
+ end
164
+
165
+ def test_service_info_interactive
166
+ assert_respond_to(@service_info, :interactive)
167
+ assert([true, false].include?(@service_info.interactive))
168
+ end
169
+
170
+ def test_service_info_service_flags
171
+ assert_respond_to(@service_info, :service_flags)
172
+ assert([0,1].include?(@service_info.service_flags))
173
+ end
174
+
175
+ def teardown
176
+ @types = nil
177
+ @states = nil
178
+ @controls = nil
179
+ end
180
+
181
+ def self.shutdown
182
+ @@services = nil
183
+ end
184
+ end