Package test

Source Code of test.ColumnTest

package test;
import static org.junit.Assert.assertEquals;

import org.junit.Test;

import src.Column;

public class ColumnTest
{
  @Test
  public void emptyColumnShouldPrintEmptyState()
  {
    Column column = new Column(0);
    assertEquals("0: ", column.printState());
  }
 
  @Test
  public void columnWithBoxAShouldPrintStateWithBoxA()
  {
    Column column = new Column(0);
    column.pileBox("a");
    assertEquals("0: a", column.printState());
  }
 
  @Test
  public void columnWithTwoBoxes()
  {
    Column column = new Column(0);
    column.pileBox("a");
    column.pileBox("b");
    assertEquals("0: a b", column.printState());
  }
 
  @Test
  public void removeBoxShould() throws Exception {
    Column column = new Column(0);
    column.pileBox("a");
   
    column.removeBox("a");
   
    assertEquals("0: ", column.printState());
  }
}
TOP

Related Classes of test.ColumnTest

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.