2016-01-10 11:12:38 +00:00
|
|
|
defmodule ISN.ISMNTest do
|
2015-05-27 16:15:09 +00:00
|
|
|
use ExUnit.Case, async: true
|
|
|
|
|
|
|
|
|
|
@test_ismn "M-060-11561-5"
|
|
|
|
|
|
|
|
|
|
test "cast" do
|
2016-01-10 11:12:38 +00:00
|
|
|
assert ISN.ISMN.cast(@test_ismn) == {:ok, @test_ismn}
|
|
|
|
|
assert ISN.ISMN.cast(nil) == :error
|
2015-05-27 16:15:09 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
test "load" do
|
2016-01-10 11:12:38 +00:00
|
|
|
assert ISN.ISMN.load(@test_ismn) == {:ok, @test_ismn}
|
2015-05-27 16:15:09 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
test "dump" do
|
2016-01-10 11:12:38 +00:00
|
|
|
assert ISN.ISMN.dump(@test_ismn) == {:ok, @test_ismn}
|
2015-05-27 16:15:09 +00:00
|
|
|
end
|
|
|
|
|
end
|