/*******************************************************************************
 * Budgetplex
 * Copyright (C) 2017 Zebulon McCorkle
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/

package me.zebmccorkle.budgetplex.test.libbudgetplex;

import me.zebmccorkle.budgetplex.libbudgetplex.Team;
import org.bukkit.ChatColor;
import org.junit.Test;

public class TestTeam {
    @Test
    public void storesNameCorrectly() {
        String name;
        Team team;

        name = "Team Name";
        team = new Team(name, ChatColor.AQUA, true);
        assert team.getName().equals(name);

        name = Double.toString(Math.random());
        team = new Team(name, ChatColor.GOLD, false);
        assert team.getName().equals(name);
    }

    @Test
    public void storesNametagColorCorrectly() {
        ChatColor color;
        Team team;

        color = ChatColor.AQUA;
        team = new Team("A Name", color, true);
        assert team.getNametagColor().equals(color);

        color = ChatColor.UNDERLINE;
        team = new Team("Another Name", color, false);
        assert team.getNametagColor().equals(color);
    }

    @Test
    public void storesCanBeChosenCorrectly() {
        boolean canBeChosen;
        Team team;

        canBeChosen = true;
        team = new Team("Woah names many names", ChatColor.BLACK, canBeChosen);
        assert team.getCanBeChosen() == canBeChosen;

        canBeChosen = false;
        team = new Team("fjhsjkhfjk", ChatColor.MAGIC, canBeChosen);
        assert team.getCanBeChosen() == canBeChosen;
    }
}

@@ -1064,26 +1064,25 @@
 tTeam %7B%0A
-  
+%0A
   @Test%0A
     publ
@@ -1065,34 +1065,32 @@
 Team %7B%0A%0A  @Test%0A
-  
   public void st
@@ -1115,20 +1115,16 @@
 ) %7B%0A    
-   
- 
 String n
@@ -1128,28 +1128,24 @@
 g name;%0A    
-   
- 
 Team team;%0A%0A
@@ -1144,28 +1144,24 @@
  team;%0A%0A    
-  
-  
 name = %22Team
@@ -1168,20 +1168,16 @@
  Name%22;%0A
-    
     team
@@ -1213,36 +1213,32 @@
 QUA, true);%0A    
- 
-   
 assert team.getN
@@ -1254,28 +1254,24 @@
 als(name);%0A%0A
-    
     name = D
@@ -1301,20 +1301,16 @@
 dom());%0A
-    
     team
@@ -1343,36 +1343,32 @@
 r.GOLD, false);%0A
-    
     assert team.
@@ -1391,35 +1391,29 @@
 (name);%0A
-  
   %7D%0A%0A  
- 
- 
 @Test%0A
-  
   public
@@ -1454,20 +1454,16 @@
 ) %7B%0A    
- 
-   
 ChatColo
@@ -1471,20 +1471,16 @@
  color;%0A
-    
     Team
@@ -1483,28 +1483,24 @@
 Team team;%0A%0A
-    
     color = 
@@ -1515,28 +1515,24 @@
 r.AQUA;%0A    
-   
- 
 team = new T
@@ -1555,28 +1555,24 @@
 lor, true);%0A
-    
     assert t
@@ -1613,20 +1613,16 @@
 );%0A%0A    
-   
- 
 color = 
@@ -1642,20 +1642,16 @@
 ERLINE;%0A
-    
     team
@@ -1693,28 +1693,24 @@
 false);%0A    
-  
-  
 assert team.
@@ -1746,17 +1746,13 @@
 r);%0A
-  
   %7D%0A%0A
-  
   @T
@@ -1757,18 +1757,16 @@
 @Test%0A  
- 
- 
 public v
@@ -1800,20 +1800,16 @@
 tly() %7B%0A
-    
     bool
@@ -1829,20 +1829,16 @@
 en;%0A    
-  
-  
 Team tea
@@ -1841,20 +1841,16 @@
  team;%0A%0A
-    
     canB
@@ -1865,20 +1865,16 @@
 = true;%0A
-    
     team
@@ -1933,36 +1933,32 @@
 , canBeChosen);%0A
-    
     assert team.
@@ -1991,20 +1991,16 @@
 hosen;%0A%0A
-    
     canB
@@ -2020,20 +2020,16 @@
 se;%0A    
-   
- 
 team = n
@@ -2081,20 +2081,16 @@
 hosen);%0A
-    
     asse
@@ -2130,16 +2130,14 @@
 Chosen;%0A
-  
   %7D%0A%7D%0A

Reformat test code