Package statechum.Helper

Examples of statechum.Helper.whatToRun


  @Test
  public void testGenerateGraphFail2()
  {
    final DrawGraphs gr = new DrawGraphs();
    final RGraph<String> g=new RBoxPlot<String>("axisX", "axisY", new File("someName"));
    checkForCorrectException(new whatToRun() { public @Override void run() {
      g.drawInteractive(gr);
    }},IllegalArgumentException.class,"empty");
  }
View Full Code Here


    final String X="axisX", Y="axisY";
    final RGraph<Double> g=new RBagPlot(X,Y, new File("someName"));
    g.setXboundaries(5.5, -34.);
    g.setYboundaries(5.5, -34.);
    g.add(5.5,34.);g.add(5.5,34.);g.add(5.5,2.);g.add(7.5,2.);
    checkForCorrectException(new whatToRun() { public @Override void run() {
      g.getDrawingCommand();
    }},IllegalArgumentException.class,"empty");
  }
View Full Code Here

    final String X="axisX", Y="axisY";
    final RGraph<Double> g=new RBagPlot(X,Y, new File("someName"));
    g.setXboundaries(5.5, -34.);
    g.setYboundaries(5.5, -34.);
    g.add(5.5,34.);g.add(5.5,34.);g.add(5.5,2.);g.add(7.5,2.);
    checkForCorrectException(new whatToRun() { public @Override void run() {
      g.getDrawingCommand();
    }},IllegalArgumentException.class,"empty");
   
  }
View Full Code Here

  public void testComputeDiagonal2()
  {
    final String X="axisX", Y="axisY";
    final RBagPlot g=new RBagPlot(X,Y, new File("someName"));
    g.add(5.5,34.);g.add(5.5,35.);
    checkForCorrectException(new whatToRun() { public @Override void run() {
      g.computeDiagonal();
    }},IllegalArgumentException.class,"width is too small");
   
 
View Full Code Here

  public void testComputeDiagonal3()
  {
    final String X="axisX", Y="axisY";
    final RBagPlot g=new RBagPlot(X,Y, new File("someName"));
    g.add(5.6,35.);g.add(5.5,35.);
    checkForCorrectException(new whatToRun() { public @Override void run() {
      g.computeDiagonal();
    }},IllegalArgumentException.class,"height is too small");
   
  }
View Full Code Here

public class TestDrawGraphs {

  @Test
  public void testVectorToRFail()
  {
    checkForCorrectException(new whatToRun() { public @Override void run() {
      DrawGraphs.vectorToR(new LinkedList<String>(),false);
    }},IllegalArgumentException.class,"empty");
  }
View Full Code Here

    final org.w3c.dom.Element elem = new Configuration().writeXML(doc), oldData = doc.createElement(Configuration.configVarTag);
    oldData.setAttribute(Configuration.configVarAttrName, "old_junk");
    oldData.setAttribute(Configuration.configVarAttrValue, "junk");
   
    elem.appendChild(oldData);
    statechum.Helper.checkForCorrectException(new whatToRun() { public void run() {
      new Configuration().readXML(elem,true);
    }}, IllegalArgumentException.class,"cannot deserialise unknown field");
  }
View Full Code Here

  }

  @Test
  public void testBoxPlotToStringFail1()
  {
    checkForCorrectException(new whatToRun() { public @Override void run() {
      DrawGraphs.boxPlotToString(new LinkedList<List<Double>>(), new LinkedList<String>(),"green",null);
    }},IllegalArgumentException.class,"empty");
  }
View Full Code Here

  @Test
  public void testSerialisationFailure2()
  {
    final org.w3c.dom.Element cnf = new Configuration().writeXML(doc);
    cnf.appendChild(doc.createElement("junk"));
    statechum.Helper.checkForCorrectException(new whatToRun() { public void run() {
      new Configuration().readXML(cnf);
    }},IllegalArgumentException.class,"unexpected element");
  }
View Full Code Here

  public void testBoxPlotToStringFail2()
  {
    final List<List<Double>> data = new LinkedList<List<Double>>();
    data.add(Arrays.asList(new Double[]{4.,5.,5.}));
    data.add(Arrays.asList(new Double[]{4.,5.,5.}));
    checkForCorrectException(new whatToRun() { public @Override void run() {
      DrawGraphs.boxPlotToString(data, new LinkedList<String>(),"green",null);
    }},IllegalArgumentException.class,"mismatch");
  }
View Full Code Here

TOP

Related Classes of statechum.Helper.whatToRun

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.