Sha256: 4e2f11b5276920d0f5da6e35d1fa2839e24b656ed530a2e569036062addf2ead

Contents?: true

Size: 1.05 KB

Versions: 17

Compression:

Stored size: 1.05 KB

Contents

#!/usr/bin/ruby

$: << "../../lib"
$: << "../../ext_lib"
$: << "../"

require "runit/testcase"
require "runit/cui/testrunner"
require "testutils"

# RateService のテスト
class RateServiceTest < Test::AbstractServiceTest
  
  def setup
    super
    @rs = Test::JsonRpcRequestor.new("rate")     
  end

  def teardown
    super
  end
  
  # レート一覧取得
  def test_basic
    
    ["1m", "10m", "6h","1d", "5d"].each {|s|
      
      puts "---" + s
      
      start = Time.now
      list = @rs.list( :EURJPY, s, Time.local(2008,8, 23).to_i, 120)
      puts "time:" + ( Time.now.to_f - start.to_f ).to_s
      
      puts list.length
      p list[0]
      
      #assert_equals list.length, 10
      list.each {|item|
        assert_equals item.length, 6
        #p item
      }
      
#      list = @rs.list_next( :EURJPY, s, Time.local(2008,8,24).to_i )
#      
#      puts list.length
#      p list[0]      
#      assert_equals list.length > 0, true
#      list.each {|item|
#        assert_equals item.length, 6
#        #p item
#      }
    }
    
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
unageanu-jiji-0.1.0 test/service/test_RateService.rb
unageanu-jiji-1.0.0 test/service/test_RateService.rb
unageanu-jiji-1.0.1 test/service/test_RateService.rb
unageanu-jiji-1.0.2 test/service/test_RateService.rb
unageanu-jiji-1.0.3 test/service/test_RateService.rb
unageanu-jiji-1.1.0 test/service/test_RateService.rb
unageanu-jiji-1.1.1 test/service/test_RateService.rb
unageanu-jiji-1.1.2 test/service/test_RateService.rb
unageanu-jiji-1.1.3 test/service/test_RateService.rb
unageanu-jiji-1.1.4 test/service/test_RateService.rb
unageanu-jiji-1.2.1 test/service/test_RateService.rb
unageanu-jiji-1.2.3 test/service/test_RateService.rb
unageanu-jiji-1.2.4 test/service/test_RateService.rb
jiji-1.2.8 test/service/test_RateService.rb
jiji-1.2.7 test/service/test_RateService.rb
jiji-1.2.6 test/service/test_RateService.rb
jiji-1.2.5 test/service/test_RateService.rb