// Path: CutletLib/src/main/java/com/cutlet/lib/errors/EmptyProjectException.java
// public class EmptyProjectException extends OptimizationFailedException {
// 
//     /**
//      * Creates a new instance of <code>EmptyProjectException</code> without
//      * detail message.
//      */
//     public EmptyProjectException() {
//     }
// 
//     /**
//      * Constructs an instance of <code>EmptyProjectException</code> with the
//      * specified detail message.
//      *
//      * @param msg the detail message.
//      */
//     public EmptyProjectException(String msg) {
//         super(msg);
//     }
// }
// 
// Path: CutletLib/src/main/java/com/cutlet/lib/errors/OptimizationFailedException.java
// public class OptimizationFailedException extends Exception {
// 
//     /**
//      * Creates a new instance of <code>OptimizationFailedException</code>
//      * without detail message.
//      */
//     public OptimizationFailedException() {
//     }
// 
//     /**
//      * Constructs an instance of <code>OptimizationFailedException</code> with
//      * the specified detail message.
//      *
//      * @param msg the detail message.
//      */
//     public OptimizationFailedException(String msg) {
//         super(msg);
//     }
//     
//     public OptimizationFailedException(Throwable other) {
//         super(other);
//     }
// }
// 
// Path: CutletLib/src/main/java/com/cutlet/lib/model/Project.java
// public class Project implements Serializable {
// 
//     private List<Panel> panels = new ArrayList<>();
//     private double bladeWidth = 3;
//     private Optional<OptimizationResult> optimizationResult;
// 
//     public List<Panel> getPanels() {
//         return panels;
//     }
// 
//     public void setPanels(@NonNull final List<Panel> inputs) {
//         this.panels = inputs;
//     }
// 
//     public double getBladeWidth() {
//         return bladeWidth;
//     }
// 
//     public void setBladeWidth(final double bladeWidth) {
//         checkArgument(bladeWidth >= 0, "bladeWidth can't be negative");
//         this.bladeWidth = bladeWidth;
//     }
// 
//     public Optional<OptimizationResult> getOptimizationResult() {
//         return optimizationResult;
//     }
// 
//     public void setOptimizationResult(@NonNull final Optional<OptimizationResult> optimizationResult) {
//         this.optimizationResult = optimizationResult;
//     }
// 
//     public void setOptimizationResult(java.util.Optional<OptimizationResult> newValue) {
//         if (newValue.isPresent()) {
//             this.optimizationResult = Optional.of(newValue.get());
// 
//         } else {
//             this.optimizationResult = Optional.absent();
// 
//         }
//     }
// 
//     public List<PanelInstance> getPanelInstances() {
//         List<PanelInstance> pis = new ArrayList<>();
//         for (Panel p : panels) {
//             for (int i = 0; i < p.getCount(); i++) {
//                 pis.add(new PanelInstance(p.getSheet(), p.getDimension(), p.getTitle(), i, p.canRotate()));
//             }
//         }
//         return pis;
//     }
// }
// 
// Path: CutletLib/src/main/java/com/cutlet/lib/testing/DataRegal.java
// public class DataRegal extends AbstractTestData {
// 
//     @Override
//     public Project getData() {
// 
//         final StockSheet sheet = makeSheet(2500, 1250);
//         int i;
// 
//         final double w = 600;
//         final boolean canRotate = false;
//         List<Panel> inputs = new ArrayList<>();
//         inputs.add(new Panel(sheet, new Dimension(500, w), "side short", canRotate, 8));
//         inputs.add(new Panel(sheet, new Dimension(560, w), "side long", canRotate, 4));
//         inputs.add(new Panel(sheet, new Dimension(450, w), "top_bottom", canRotate, 12));
//         inputs.add(new Panel(sheet, new Dimension(25, w), "halter", canRotate, 16));
// 
//         return makeProject(inputs, 4);
//     }
// 
//     @Override
//     public String getTitle() {
//         return "DataRegal";
//     }
// 
// }


import com.cutlet.lib.errors.EmptyProjectException;
import com.cutlet.lib.errors.OptimizationFailedException;
import com.cutlet.lib.model.Project;
import com.cutlet.lib.testing.DataRegal;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cutlet.lib.optimizer;


/**
 *
 * @author rmuehlba
 */
public class OptimizerTest {
    
    public OptimizerTest() {
    }
    
    @BeforeClass
    public static void setUpClass() {
    }
    
    @AfterClass
    public static void tearDownClass() {
    }
    
    @Before
    public void setUp() {
    }
    
    @After
    public void tearDown() {
    }

    /**
     * Test of optimize method, of class Optimizer.
     */
    @org.junit.Test
    public void testOptimize() throws EmptyProjectException, OptimizationFailedException {
        System.out.println("optimize");

// Path: CutletLib/src/main/java/com/cutlet/lib/errors/EmptyProjectException.java
// public class EmptyProjectException extends OptimizationFailedException {
// 
//     /**
//      * Creates a new instance of <code>EmptyProjectException</code> without
//      * detail message.
//      */
//     public EmptyProjectException() {
//     }
// 
//     /**
//      * Constructs an instance of <code>EmptyProjectException</code> with the
//      * specified detail message.
//      *
//      * @param msg the detail message.
//      */
//     public EmptyProjectException(String msg) {
//         super(msg);
//     }
// }
// 
// Path: CutletLib/src/main/java/com/cutlet/lib/errors/OptimizationFailedException.java
// public class OptimizationFailedException extends Exception {
// 
//     /**
//      * Creates a new instance of <code>OptimizationFailedException</code>
//      * without detail message.
//      */
//     public OptimizationFailedException() {
//     }
// 
//     /**
//      * Constructs an instance of <code>OptimizationFailedException</code> with
//      * the specified detail message.
//      *
//      * @param msg the detail message.
//      */
//     public OptimizationFailedException(String msg) {
//         super(msg);
//     }
//     
//     public OptimizationFailedException(Throwable other) {
//         super(other);
//     }
// }
// 
// Path: CutletLib/src/main/java/com/cutlet/lib/model/Project.java
// public class Project implements Serializable {
// 
//     private List<Panel> panels = new ArrayList<>();
//     private double bladeWidth = 3;
//     private Optional<OptimizationResult> optimizationResult;
// 
//     public List<Panel> getPanels() {
//         return panels;
//     }
// 
//     public void setPanels(@NonNull final List<Panel> inputs) {
//         this.panels = inputs;
//     }
// 
//     public double getBladeWidth() {
//         return bladeWidth;
//     }
// 
//     public void setBladeWidth(final double bladeWidth) {
//         checkArgument(bladeWidth >= 0, "bladeWidth can't be negative");
//         this.bladeWidth = bladeWidth;
//     }
// 
//     public Optional<OptimizationResult> getOptimizationResult() {
//         return optimizationResult;
//     }
// 
//     public void setOptimizationResult(@NonNull final Optional<OptimizationResult> optimizationResult) {
//         this.optimizationResult = optimizationResult;
//     }
// 
//     public void setOptimizationResult(java.util.Optional<OptimizationResult> newValue) {
//         if (newValue.isPresent()) {
//             this.optimizationResult = Optional.of(newValue.get());
// 
//         } else {
//             this.optimizationResult = Optional.absent();
// 
//         }
//     }
// 
//     public List<PanelInstance> getPanelInstances() {
//         List<PanelInstance> pis = new ArrayList<>();
//         for (Panel p : panels) {
//             for (int i = 0; i < p.getCount(); i++) {
//                 pis.add(new PanelInstance(p.getSheet(), p.getDimension(), p.getTitle(), i, p.canRotate()));
//             }
//         }
//         return pis;
//     }
// }
// 
// Path: CutletLib/src/main/java/com/cutlet/lib/testing/DataRegal.java
// public class DataRegal extends AbstractTestData {
// 
//     @Override
//     public Project getData() {
// 
//         final StockSheet sheet = makeSheet(2500, 1250);
//         int i;
// 
//         final double w = 600;
//         final boolean canRotate = false;
//         List<Panel> inputs = new ArrayList<>();
//         inputs.add(new Panel(sheet, new Dimension(500, w), "side short", canRotate, 8));
//         inputs.add(new Panel(sheet, new Dimension(560, w), "side long", canRotate, 4));
//         inputs.add(new Panel(sheet, new Dimension(450, w), "top_bottom", canRotate, 12));
//         inputs.add(new Panel(sheet, new Dimension(25, w), "halter", canRotate, 16));
// 
//         return makeProject(inputs, 4);
//     }
// 
//     @Override
//     public String getTitle() {
//         return "DataRegal";
//     }
// 
// }


// Path: CutletLib/src/test/java/com/cutlet/lib/optimizer/OptimizerTest.java
import com.cutlet.lib.errors.EmptyProjectException;
import com.cutlet.lib.errors.OptimizationFailedException;
import com.cutlet.lib.model.Project;
import com.cutlet.lib.testing.DataRegal;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cutlet.lib.optimizer;


/**
 *
 * @author rmuehlba
 */
public class OptimizerTest {
    
    public OptimizerTest() {
    }
    
    @BeforeClass
    public static void setUpClass() {
    }
    
    @AfterClass
    public static void tearDownClass() {
    }
    
    @Before
    public void setUp() {
    }
    
    @After
    public void tearDown() {
    }

    /**
     * Test of optimize method, of class Optimizer.
     */
    @org.junit.Test
    public void testOptimize() throws EmptyProjectException, OptimizationFailedException {
        System.out.println("optimize");

        Project project = (new DataRegal()).getData();
