@@ -0,0 +1,1791 @@
+/*%0A * Project to resolve 2D cutting stock problem for Discreet Optimizations course at Polytech Lyon%0A * Copyright (C) 2015.  CARON Antoine and CHAUSSENDE Adrien%0A *%0A * This program is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU Affero General Public License as%0A * published by the Free Software Foundation, either version 3 of the%0A * License, or (at your option) any later version.%0A *%0A * This program is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A * GNU Affero General Public License for more details.%0A *%0A * You should have received a copy of the GNU Affero General Public License%0A * along with this program.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A */%0A%0Apackage com.polytech4A.cuttingstock.core.model;%0A%0Aimport junit.framework.TestCase;%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport java.util.ArrayList;%0A%0Apublic class PatternTest %7B%0A%0A    private Pattern pattern;%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        ArrayList%3CBox%3E boxes = new ArrayList%3CBox%3E();%0A        pattern = new Pattern(new Vector(1, 1), boxes);%0A        boxes.add(new Box(new Vector(933.0, 372.0), 6));%0A        boxes.add(new Box(new Vector(893.0, 307.0), 2));%0A        boxes.add(new Box(new Vector(727.0, 333.0), 5));%0A    %7D%0A%0A    @After%0A    public void tearDown() throws Exception %7B%0A        pattern.getAmounts().clear();%0A        pattern = null;%0A    %7D%0A%0A    @Test%0A    public void testGetBoxes() throws Exception %7B%0A        ArrayList%3CBox%3E result = pattern.getBoxes();%0A        TestCase.assertEquals(13, result.size());%0A        for (Box b : result) %7B%0A            System.out.println(b);%0A        %7D%0A    %7D%0A%7D

Add unit test for getBoxes for Pattern class.