You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.3 KiB

  1. package rpc
  2. import (
  3. "testing"
  4. )
  5. //--------------------------------------------------------------------------------
  6. // Test the HTTP client
  7. func TestHTTPStatus(t *testing.T) {
  8. testStatus(t, "HTTP")
  9. }
  10. func TestHTTPGenPriv(t *testing.T) {
  11. testGenPriv(t, "HTTP")
  12. }
  13. func TestHTTPGetAccount(t *testing.T) {
  14. testGetAccount(t, "HTTP")
  15. }
  16. func TestHTTPSignedTx(t *testing.T) {
  17. testSignedTx(t, "HTTP")
  18. }
  19. func TestHTTPBroadcastTx(t *testing.T) {
  20. testBroadcastTx(t, "HTTP")
  21. }
  22. func TestHTTPGetStorage(t *testing.T) {
  23. testGetStorage(t, "HTTP")
  24. }
  25. func TestHTTPCallCode(t *testing.T) {
  26. testCallCode(t, "HTTP")
  27. }
  28. func TestHTTPCallContract(t *testing.T) {
  29. testCall(t, "HTTP")
  30. }
  31. //--------------------------------------------------------------------------------
  32. // Test the JSONRPC client
  33. func TestJSONStatus(t *testing.T) {
  34. testStatus(t, "JSONRPC")
  35. }
  36. func TestJSONGenPriv(t *testing.T) {
  37. testGenPriv(t, "JSONRPC")
  38. }
  39. func TestJSONGetAccount(t *testing.T) {
  40. testGetAccount(t, "JSONRPC")
  41. }
  42. func TestJSONSignedTx(t *testing.T) {
  43. testSignedTx(t, "JSONRPC")
  44. }
  45. func TestJSONBroadcastTx(t *testing.T) {
  46. testBroadcastTx(t, "JSONRPC")
  47. }
  48. func TestJSONGetStorage(t *testing.T) {
  49. testGetStorage(t, "JSONRPC")
  50. }
  51. func TestJSONCallCode(t *testing.T) {
  52. testCallCode(t, "JSONRPC")
  53. }
  54. func TestJSONCallContract(t *testing.T) {
  55. testCall(t, "JSONRPC")
  56. }