onkyo_eiscp_ruby 0.0.2 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/test/tc_command.rb DELETED
@@ -1,30 +0,0 @@
1
- require_relative "../lib/eiscp/command.rb"
2
- require "test/unit"
3
-
4
- class TestCommand < Test::Unit::TestCase
5
-
6
- def test_command_to_name
7
- assert_equal(Command.command_to_name("PWR"), "system-power")
8
- end
9
-
10
- def test_name_to_command
11
- assert_equal(Command.name_to_command("system-power"), "PWR")
12
- end
13
-
14
- def test_command_value_to_value_name
15
- assert_equal(Command.command_value_to_value_name("PWR", "01"), "on")
16
- end
17
-
18
- def test_command_value_name_to_value
19
- assert_equal(Command.command_value_name_to_value("PWR", "on"), "01")
20
- end
21
-
22
- def test_description_from_name
23
- assert_equal(Command.description_from_name("system-power"), "System Power Command")
24
- end
25
-
26
- def test_description_from_command
27
- assert_equal(Command.description_from_command("PWR"), "System Power Command")
28
- end
29
-
30
- end
data/test/tc_eiscp.rb DELETED
@@ -1,6 +0,0 @@
1
- require_relative "../lib/eiscp/eiscp.rb"
2
- require "test/unit"
3
-
4
- class TestEISCP
5
-
6
- end
@@ -1,17 +0,0 @@
1
- require_relative "../lib/eiscp/eiscp_packet.rb"
2
- require "test/unit"
3
-
4
- class TestEISCPPacket < Test::Unit::TestCase
5
-
6
- DISCOVERY_STRING = "ISCP\x00\x00\x00\x10\x00\x00\x00\n\x01\x00\x00\x00!xECNQSTN\r"
7
- DISCOVERY_PACKET = EISCPPacket.new('ECN', 'QSTN', 'x', '!')
8
-
9
- def test_create_discovery_packet_string
10
- assert_equal(DISCOVERY_PACKET.to_s, DISCOVERY_STRING)
11
- end
12
-
13
- def test_parse_discovery_packet_string
14
- assert_equal(EISCPPacket.parse(DISCOVERY_STRING).to_s, DISCOVERY_PACKET.to_s)
15
- end
16
-
17
- end
@@ -1,14 +0,0 @@
1
- require_relative "../lib/eiscp/iscp_message.rb"
2
- require "test/unit"
3
-
4
- class TestISCPMessage < Test::Unit::TestCase
5
-
6
- def test_create_discovery_iscp_message
7
- assert_equal(ISCPMessage.new("ECN", "QSTN", "x", "!").to_s, "!xECNQSTN\r")
8
- end
9
-
10
- def test_parse_discovery_iscp_message
11
- assert_equal(ISCPMessage.parse("!xECNQSTN\r").to_s, "!xECNQSTN\r")
12
- end
13
-
14
- end