Package vee

Source Code of vee.EquipmentTest

package vee;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
import vee.enemies.Henchwoman;
import vee.items.armors.Corset;


public class EquipmentTest {

  public EquipmentTest() {
  }

  @BeforeClass
  public static void setUpClass() {
  }

  @AfterClass
  public static void tearDownClass() {
  }

  @Before
  public void setUp() {
  }

  @After
  public void tearDown() {
  }


  /**
   * Testing equipping a corset on an empty chest slot.
   */
  @Test
  public void testEquipCorsetOnEmptyChestSlot() {
    System.out.println("Testing equipping a corset on an empty chest slot");
    Corset corset = new Corset();
    Henchwoman h = new Henchwoman();
   
    h.unequip(h.equipment.getChest());

    assertEquals(h.equipment.getChest(), null);
    boolean result = h.equip(corset);

    assertEquals(result, true);
    assertEquals(h.isEquipped(corset), true);

  }

  /**
   * Testing equipping a corset on an equipped chest slot.
   */
  @Test
  public void testEquipCorsetOnEquippedChestSlot() {
    System.out.println("Testing equipping a corset on an equipped chest slot");
    Corset corset = new Corset();
    Corset corset2 = new Corset();
    Henchwoman h = new Henchwoman();

    h.equip(corset);
    boolean result = h.equip(corset2);

    assertEquals(result, true);
    assertEquals(h.isEquipped(corset2), true);
    assertEquals(h.isEquipped(corset), false);

  }



}
TOP

Related Classes of vee.EquipmentTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.