Skip to content

Commit 9ec9584

Browse files
author
Matthias Kalb
committed
Refactor tests
1 parent b011aaf commit 9ec9584

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

test/bankster/bic_test.exs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
defmodule Bankster.Bic.BicTest do
22
use ExUnit.Case
33

4+
## -- Module constants
45
@valid_bics [
56
"RBOSGGSX",
67
"RZTIAT22263",
@@ -12,6 +13,7 @@ defmodule Bankster.Bic.BicTest do
1213
]
1314
@invalid_bics ["CE1EL2LLFFF", "E31DCLLFFF", "", " ", nil]
1415

16+
## -- Test cases
1517
test "valid?/1" do
1618
## -- VALID BICS
1719
for bic <- @valid_bics, do: assert(Bankster.Bic.valid?(bic) == true)

test/bankster/iban_test.exs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
defmodule Bankster.Iban.IbanTest do
22
use ExUnit.Case
33

4+
## -- Module constants
5+
46
# IBAN list from http://www.mobilefish.com/download/iban/random_generated_iban.txt
57
@unformated_ibans [
68
"AL86751639367318444714198669",
@@ -311,6 +313,7 @@ defmodule Bankster.Iban.IbanTest do
311313
nil
312314
]
313315

316+
## -- Test cases
314317
test "format_compact/1" do
315318
# Unformated IBANs
316319
for iban <- @unformated_ibans do

test/bankster_test.exs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
defmodule BanksterTest do
22
use ExUnit.Case
33

4+
## -- Module constants
5+
46
# IBAN list from http://www.mobilefish.com/download/iban/random_generated_iban.txt
57
@unformated_ibans [
68
"AL86751639367318444714198669",
@@ -322,6 +324,7 @@ defmodule BanksterTest do
322324

323325
@invalid_bics ["CE1EL2LLFFF", "E31DCLLFFF", "", " ", nil]
324326

327+
## -- Test cases
325328
test "bic_valid?/1" do
326329
# Valid BICs
327330
for bic <- @valid_bics, do: assert(Bankster.bic_valid?(bic) == Bankster.Bic.valid?(bic))

0 commit comments

Comments
 (0)