Package classes

Examples of classes.NBestList


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


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

  }
 
  @Test
  public void testSortString() {
    try {
      NBestList n = new NBestList();
      n.addResult("r1", 2, 2, 2);
      n.addResult("r2", 22, 222, 23);
      n.sortDescending();
     
      if (!(n.get(0).getName().equals("r2"))
          && !(n.get(1).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

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.