onkyo_eiscp_ruby 0.0.3 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/test/tc_command.rb DELETED
@@ -1,43 +0,0 @@
1
- require_relative "../lib/eiscp/command.rb"
2
- require_relative "../lib/eiscp/message.rb"
3
- require "test/unit"
4
-
5
- class TestCommand < Test::Unit::TestCase
6
-
7
- def test_command_to_name
8
- assert_equal(Command.command_to_name("PWR"), "system-power")
9
- end
10
-
11
- def test_command_name_to_command
12
- assert_equal(Command.command_name_to_command("system-power"), "PWR")
13
- end
14
-
15
- def test_command_value_to_value_name
16
- assert_equal(Command.command_value_to_value_name("PWR", "01"), "on")
17
- end
18
-
19
- def test_command_value_name_to_value
20
- assert_equal(Command.command_value_name_to_value("PWR", "on"), "01")
21
- end
22
-
23
- def test_description_from_command_name
24
- assert_equal(Command.description_from_command_name("system-power"), "System Power Command")
25
- end
26
-
27
- def test_description_from_command
28
- assert_equal(Command.description_from_command("PWR"), "System Power Command")
29
- end
30
-
31
- def test_parse_system_power
32
- assert_equal(Command.parse('system-power on'), EISCP::Message.parse('PWR01'))
33
- end
34
-
35
- def test_parse_zone2_system_power
36
- assert_equal(Command.parse('zone2 power on'), EISCP::Message.parse('ZPW01'))
37
- end
38
-
39
- def test_parse_volume_as_integer
40
- assert_equal(Command.parse('main-volume 25'), EISCP::Message.parse('MVL19'))
41
- end
42
-
43
- end