25 lines
626 B
Elixir
25 lines
626 B
Elixir
defmodule Microwaveprop.Propagation.RegionTest do
|
|
use ExUnit.Case, async: true
|
|
|
|
alias Microwaveprop.Propagation.Region
|
|
|
|
test "Atlanta GA is in southeast" do
|
|
assert Region.for_point(33.7, -84.4) == :southeast
|
|
end
|
|
|
|
test "Denver CO falls into a region" do
|
|
assert Region.for_point(39.7, -104.9) in [
|
|
:northwest,
|
|
:northcentral,
|
|
:southwest,
|
|
:southeentral,
|
|
:midwest,
|
|
:mountain_west,
|
|
:other
|
|
]
|
|
end
|
|
|
|
test "returns :other for points outside CONUS" do
|
|
assert Region.for_point(19.0, -155.0) == :other
|
|
end
|
|
end
|