 defmodule LanguageListTest do
   use ExUnit.Case
 
-  alias LanguageList, as: LL
-
-  @languages ~w/Clojure Haskell Erlang F# Elixir/
-  @languages_reversed Enum.reverse(@languages)
-
   # @tag :pending
   test "new list" do
-    assert LL.new() == []
+    assert LanguageList.new() == []
   end
 
   @tag :pending
   test "count an empty list" do
-    assert LL.new() |> LL.count() == 0
+    assert LanguageList.new() |> LanguageList.count() == 0
   end
 
   @tag :pending

  @tag :pending
  test "adding two languages, when removed, removes first item" do
    list =
      LL.new()
      |> LL.add("F#")
      |> LL.add("Elixir")
      |> LL.remove()

    assert list = ~w/F#/
  end

  @tag :pending
  test "first on an empty list raises an error" do
    assert_raise ArgumentError, fn -> LL.new() |> LL.first() end
  end

  @tag :pending
  test "add one language, then get the first" do
    assert LL.new() |> LL.add("Elixir") |> LL.first() == "Elixir"
  end

  @tag :pending
  test "add a few languages, then get the first" do
    first =
      LL.new()
      |> LL.add("Elixir")
      |> LL.add("Prolog")
      |> LL.add("F#")
      |> LL.first()

    assert first == "F#"
  end

  @tag :pending
  test "the count of a new list is 0" do
    assert LL.new() |> LL.count() == 0
  end

  @tag :pending
  test "the count of a one-language list is 1" do
    count =
      LL.new()
      |> LL.add("Elixir")
      |> LL.count()

    assert count == 1
  end

  @tag :pending
  test "the count of a multiple-item list is equal to its length" do
    count =
      LanguageList.new()
      |> LanguageList.add("Elixir")
      |> LanguageList.add("Prolog")
      |> LanguageList.add("F#")
      |> LanguageList.count()

    assert count == 3
  end

  @tag :pending
  test "an exciting language list" do
    assert LanguageList.exciting_list?(["Clojure", "Haskell", "Erlang", "F#", "Elixir"])
  end

  @tag :pending
  test "not an exciting language list" do
    refute LanguageList.exciting_list?(["Java", "C", "JavaScript"])
  end
end
