1use Test::More;
2
3BEGIN { use_ok('Chart::Clicker::Data::Series::HighLow'); }
4
5my $series = Chart::Clicker::Data::Series::HighLow->new;
6ok(defined($series), 'new Chart::Clicker::Data::Series::HighLow');
7isa_ok($series, 'Chart::Clicker::Data::Series::HighLow');
8
9my $fooseries = Chart::Clicker::Data::Series::HighLow->new({
10    keys => [ 1, 2, 3, 4 ],
11    highs => [ 11, 9, 12, 14 ],
12    lows => [ 5, 1, 4, 12 ],
13    opens => [ 4, 5, 6, 7 ],
14    values => [ 5, 6, 7, 14 ],
15});
16
17cmp_ok($fooseries->get_high(1), '==', 9, 'high 1');
18cmp_ok($fooseries->get_low(1), '==', 1, 'low 1');
19cmp_ok($fooseries->get_open(1), '==', 5, 'open 5');
20
21my $range = $fooseries->range;
22cmp_ok($range->lower, '==', 1, 'range lower');
23cmp_ok($range->upper, '==', 14, 'range upper');
24
25done_testing;