#!perl -T

use strict;
use warnings;

# Test 201201051854-KVTP
#
#
# 2012/01/05 18:54 KVTP 051854Z AUTO 10SM CLR 01/M13 A3031 RMK AO2

use Test::More tests => 52;
use Geo::WeatherNWS;

my $rpt = Geo::WeatherNWS::new();
my $obs = '2012/01/05 18:54 KVTP 051854Z AUTO 10SM CLR 01/M13 A3031 RMK AO2 ';
my $decode = $rpt->decodeobs($obs);

is( $rpt->{cloudcover}, 'Clear', 'cloudcover 201201051854-KVTP' );
is_deeply( \$rpt->{cloudlevel_arrayref},
    \['CLR'], 'cloudlevel_arrayref 201201051854-KVTP' );
is( $rpt->{code},           'KVTP',  'code 201201051854-KVTP' );
is( $rpt->{conditions1},    '',      'conditions1 201201051854-KVTP' );
is( $rpt->{conditions2},    '',      'conditions2 201201051854-KVTP' );
is( $rpt->{conditionstext}, 'Clear', 'conditionstext 201201051854-KVTP' );
is( $rpt->{day},            '05',    'day 201201051854-KVTP' );
is( $rpt->{dewpoint_c},     '-13',   'dewpoint_c 201201051854-KVTP' );
is( $rpt->{dewpoint_f},     '9',     'dewpoint_f 201201051854-KVTP' );
is( $rpt->{error},          '',      'error 201201051854-KVTP' );
is( $rpt->{errortext},      '',      'errortext 201201051854-KVTP' );
is( $rpt->{eventbe},        '',      'eventbe 201201051854-KVTP' );
is( $rpt->{heat_index_c},   '',      'heat_index_c 201201051854-KVTP' );
is( $rpt->{heat_index_f},   '',      'heat_index_f 201201051854-KVTP' );
is( $rpt->{http},           '',      'http 201201051854-KVTP' );
is( $rpt->{intensity},      '',      'intensity 201201051854-KVTP' );
is( $rpt->{maintenance},    '',      'maintenance 201201051854-KVTP' );
is( $rpt->{obs},
    '2012/01/05 18:54 KVTP 051854Z AUTO 10SM CLR 01/M13 A3031 RMK AO2 ',
    'obs 201201051854-KVTP'
);
is( $rpt->{precipslr},     '',            'precipslr 201201051854-KVTP' );
is( $rpt->{pressure_inhg}, '30.31',       'pressure_inhg 201201051854-KVTP' );
is( $rpt->{pressure_kgcm}, '1.046652796', 'pressure_kgcm 201201051854-KVTP' );
is( $rpt->{pressure_lbin}, '14.88687774', 'pressure_lbin 201201051854-KVTP' );
is( $rpt->{pressure_mb},   '1026',        'pressure_mb 201201051854-KVTP' );
is( $rpt->{pressure_mmhg}, '770',         'pressure_mmhg 201201051854-KVTP' );
is( $rpt->{ptemperature},  '',            'ptemperature 201201051854-KVTP' );
is( $rpt->{relative_humidity}, '34', 'relative_humidity 201201051854-KVTP' );
is_deeply(
    \$rpt->{remark_arrayref},
    \[ 'RMK', 'AO2' ],
    'remark_arrayref 201201051854-KVTP'
);
is( $rpt->{slp_inhg},      '',          'slp_inhg 201201051854-KVTP' );
is( $rpt->{slp_kgcm},      '',          'slp_kgcm 201201051854-KVTP' );
is( $rpt->{slp_lbin},      '',          'slp_lbin 201201051854-KVTP' );
is( $rpt->{slp_mb},        '',          'slp_mb 201201051854-KVTP' );
is( $rpt->{slp_mmhg},      '',          'slp_mmhg 201201051854-KVTP' );
is( $rpt->{station_type},  'Automated', 'station_type 201201051854-KVTP' );
is( $rpt->{storm},         '',          'storm 201201051854-KVTP' );
is( $rpt->{temperature_c}, '1',         'temperature_c 201201051854-KVTP' );
is( $rpt->{temperature_f}, '34',        'temperature_f 201201051854-KVTP' );
is( $rpt->{templateout},   '',          'templateout 201201051854-KVTP' );
is( $rpt->{tfile},         '',          'tfile 201201051854-KVTP' );
is( $rpt->{thpressure},    '',          'thpressure 201201051854-KVTP' );
is( $rpt->{time},          '1854',      'time 201201051854-KVTP' );
is( $rpt->{visibility_km}, '16',        'visibility_km 201201051854-KVTP' );
is( $rpt->{visibility_mi}, '10',        'visibility_mi 201201051854-KVTP' );
is( $rpt->{windchill_c},   '',          'windchill_c 201201051854-KVTP' );
is( $rpt->{windchill_f},   '',          'windchill_f 201201051854-KVTP' );
is( $rpt->{winddir},       '',          'winddir 201201051854-KVTP' );
is( $rpt->{winddirtext},   '',          'winddirtext 201201051854-KVTP' );
is( $rpt->{windgustkmh},   '',          'windgustkmh 201201051854-KVTP' );
is( $rpt->{windgustkts},   '',          'windgustkts 201201051854-KVTP' );
is( $rpt->{windgustmph},   '',          'windgustmph 201201051854-KVTP' );
is( $rpt->{windspeedkmh},  '',          'windspeedkmh 201201051854-KVTP' );
is( $rpt->{windspeedkts},  '',          'windspeedkts 201201051854-KVTP' );
is( $rpt->{windspeedmph},  '',          'windspeedmph 201201051854-KVTP' );
