Package classes

Examples of classes.NBestList


import classes.NBestList;

public class NBestListTest {
  @Test
  public void testCtor() {
    NBestList n = new NBestList();
    try {
      if (n.isEmpty()) {
      }
    }
    catch (Exception e) {
      fail("constructor not working properly for NBList");
    }
View Full Code Here


    }
  }
 
  @Test
  public void testIsEmpty() {
    NBestList n = new NBestList();
    if (!n.isEmpty())
      fail("IsEmpty not working in NBestList");
  }
View Full Code Here

      fail("IsEmpty not working in NBestList");
  }
 
  @Test
  public void testAdd() {
    NBestList n = new NBestList();
    try {
      n.addResult("r1", 2, 2, 2);
      if (n.isEmpty())
        fail("AddResult not working");
    }
    catch (Exception e) {
      fail("AddResult not working, due to other exceptions: "
          + e.getMessage());
View Full Code Here

  }
 
  @Test
  public void testName() {
    try {
      NBestList n = new NBestList();
      n.addResult("r1", 2, 2, 2);
      n.addResult("r2", 2, 2, 2);
      if (!n.getName().equals("r1"))
        fail("getName() not working as expected!");
    }
    catch (Exception e) {
      fail("getName() not working, due to exceptions: " + e.getMessage());
    }
View Full Code Here

  }
 
  @Test
  public void testNameSizeZero() {
    try {
      NBestList n = new NBestList();
      if (!n.getName().equals(""))
        fail("getName() not working as expected!");
    }
    catch (Exception e) {
      fail("getName() not working, due to exceptions: " + e.getMessage());
    }
View Full Code Here

  }
 
  @Test
  public void testScore() {
    try {
      NBestList n = new NBestList();
      n.addResult("r1", 2, 2, 2);
      n.addResult("r2", 22, 222, 23);
      if (n.getScore() != 2)
        fail("Score() not working as expected!");
    }
    catch (Exception e) {
      fail("Score() not working, due to exceptions: " + e.getMessage());
    }
View Full Code Here

  }
 
  @Test
  public void testScoreSizeZero() {
    try {
      NBestList n = new NBestList();
      if (n.getScore() != -1.0)
        fail("Score() not working as expected!");
    }
    catch (Exception e) {
      fail("Score() not working, due to exceptions: " + e.getMessage());
    }
View Full Code Here

  }
 
  @Test
  public void testDistance() {
    try {
      NBestList n = new NBestList();
      n.addResult("r1", 2, 2, 2);
      n.addResult("r2", 22, 222, 23);
      if (n.getDistance() != 2)
        fail("getDistance() not working as expected!");
    }
    catch (Exception e) {
      fail("getDistance() not working, due to exceptions: "
          + e.getMessage());
View Full Code Here

  }
 
  @Test
  public void testDistanceSizeZero() {
    try {
      NBestList n = new NBestList();
      if (n.getDistance() != 0)
        fail("getDistance() not working as expected!");
    }
    catch (Exception e) {
      fail("NBestList threw an unexpected exception");
    }
View Full Code Here

  }
 
  @Test
  public void testAngle() {
    try {
      NBestList n = new NBestList();
      n.addResult("r1", 2, 2, 2);
      n.addResult("r2", 22, 222, 23);
      if (n.getAngle() != 2)
        fail("getAngle not working as expected!");
    }
    catch (Exception e) {
      fail("getAngle not working, due to exceptions: " + e.getMessage());
    }
View Full Code Here

TOP

Related Classes of classes.NBestList

Copyright © 2018 www.massapicom. 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.