Examples of NBestList


Examples of classes.NBestList

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

Examples of classes.NBestList

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

Examples of classes.NBestList

  }
 
  @Test
  public void testNamesSizeZero() {
    try {
      NBestList n = new NBestList();
     
      if (!(n.getNames() == null))
        fail("Names() not working as expected! Value of s: " + n.getNames());
    }
    catch (Exception e) {
      fail("Names() not working, due to exceptions: " + e.getMessage());
    }
  }
View Full Code Here

Examples of classes.NBestList

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

Examples of classes.NBestList

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

Examples of classes.NBestList

  }
 
  @Test
  public void testScores() {
    try {
      NBestList n = new NBestList();
      n.addResult("r1", 2, 2, 2);
      n.addResult("r2", 22, 22, 22);
      double[] d = n.getScores();
      if (d == null)
        return;
      if (d[0] != 2 && d[1] != 22)
        fail("Scores() not working as expected!");
    }
View Full Code Here

Examples of classes.NBestList

  }
 
  @Test
  public void testScoresSizeZero() {
    try {
      NBestList n = new NBestList();
      double[] d = n.getScores();
      if (d[0] != 0.0 && d[1] != 0.0)
        fail("Scores() not working as expected!");
    }
    catch (Exception e) {
    }
View Full Code Here

Examples of classes.NBestList

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

Examples of classes.NBestList

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

Examples of classes.NBestList

  }
 
  @Test
  public void testGet() {
    try {
      NBestList n = new NBestList();
      n.addResult("r1", 2, 2, 2);
      n.addResult("r2", 22, 222, 23);
      if (!(n.get(0).getName().equals("r1")))
        fail("get() not working as expected!");
    }
    catch (Exception e) {
      fail("get() not working, due to exceptions: " + e.getMessage());
    }
View Full Code Here
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.