Sha256: 938a186f97f8fc50096d78ef56ff1cc554c38a09032148511ef1052efda9d57e

Contents?: true

Size: 846 Bytes

Versions: 1

Compression:

Stored size: 846 Bytes

Contents

# -*- coding:utf-8 -*-
require 'rubygems'
require 'bundler/setup'
$:.unshift File.expand_path '../lib', File.dirname(__FILE__)
require 'minitest/autorun'

require 'weather_pinpoint_jp'

class Test3h < Minitest::Test
  def setup
  end

  def test_load
    f = WeatherPinpointJp.load("test_data", File.dirname(__FILE__) + "/test_data2.xml")
    assert_equal f.nil?, false, "load() failed..."

    assert_equal f.weather_3h.size, 10 # 32/3 = 10.66... => 10

    assert_equal f.weather_3h[0], 100
    assert_equal f.weather_3h[1], 200
    assert_equal f.weather_3h[2], 300
    assert_equal f.weather_3h[3], 400
    assert_equal f.weather_3h[4], 550
    assert_equal f.weather_3h[5], 850
    assert_equal f.weather_3h[6], 200
    assert_equal f.weather_3h[7], 300
    assert_equal f.weather_3h[8], 400
    assert_equal f.weather_3h[9], 850
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
weather_pinpoint_jp-0.0.5 test/test_3h.rb