Package com.luxoft.dnepr.courses.unit2.model

Examples of com.luxoft.dnepr.courses.unit2.model.Circle


    }

    @Test
    public void calculateOverallAreaTest() {
        List<Figure> figures = new ArrayList<Figure>();
        figures.add(new Circle(2d));
        figures.add(new Square(3d));
        figures.add(new Hexagon(4d));
        final double SUM_OF_SQUARES = 63.1355899d;
        Assert.assertEquals(SUM_OF_SQUARES, LuxoftUtils.calculateOverallArea(figures), DELTA);
    }
View Full Code Here


    }

    @Test
    public void testCalculateOverallArea() {
        ArrayList<Figure> list1 = new ArrayList<Figure>();
        list1.add(new Circle(1));
        list1.add(new Square(2));
        list1.add(new Hexagon(3));
        double overallArea1 = Math.PI + 4 + (3 * Math.sqrt(3) / 2) * 9;
        assertEquals(overallArea1, LuxoftUtils.calculateOverallArea(list1), delta);

        ArrayList<Figure> list2 = new ArrayList<Figure>();
        list1.add(new Square(5));
        list1.add(new Hexagon(7));
        list1.add(new Circle(9));
        list1.add(new Square(8));
        double overallArea2 = Math.PI * 25 (3 * Math.sqrt(3) / 2) * 49 + Math.PI * 81 + 64;
    }
View Full Code Here

        list1.add(null);
        list1.add(null);
        assertEquals(0.00, LuxoftUtils.calculateOverallArea(list1), delta);

        ArrayList<Figure> list2 = new ArrayList<Figure>();
        list2.add(new Circle(2));
        list2.add(null);
        list2.add(new Hexagon(3));
        double overallArea2 = Math.PI * 4 + (3 * Math.sqrt(3) / 2) * 9;
        assertEquals(overallArea2, LuxoftUtils.calculateOverallArea(list2), delta);

        ArrayList<Figure> list3 = new ArrayList<Figure>();
        list3.add(new Circle(0));
        list3.add(new Square(0));
        list3.add(new Hexagon(0));
        assertEquals(0.00, LuxoftUtils.calculateOverallArea(list3), delta);
    }
View Full Code Here

    @Test
    public void calculateOverallAreaTest() {
        List<Figure> figures = new ArrayList<Figure>();
        figures.add(new Circle(2d));
        figures.add(new Square(3d));
        figures.add(new Hexagon(4d));
        final double SUM_OF_SQUARES = 63.1355899d;
        Assert.assertEquals(SUM_OF_SQUARES, LuxoftUtils.calculateOverallArea(figures), DELTA);
    }
View Full Code Here

    @Test
    public void testCalculateOverallArea() {
        ArrayList<Figure> list1 = new ArrayList<Figure>();
        list1.add(new Circle(1));
        list1.add(new Square(2));
        list1.add(new Hexagon(3));
        double overallArea1 = Math.PI + 4 + (3 * Math.sqrt(3) / 2) * 9;
        assertEquals(overallArea1, LuxoftUtils.calculateOverallArea(list1), delta);

        ArrayList<Figure> list2 = new ArrayList<Figure>();
        list1.add(new Square(5));
        list1.add(new Hexagon(7));
        list1.add(new Circle(9));
        list1.add(new Square(8));
        double overallArea2 = Math.PI * 25 (3 * Math.sqrt(3) / 2) * 49 + Math.PI * 81 + 64;
    }
View Full Code Here

        assertEquals(0.00, LuxoftUtils.calculateOverallArea(list1), delta);

        ArrayList<Figure> list2 = new ArrayList<Figure>();
        list2.add(new Circle(2));
        list2.add(null);
        list2.add(new Hexagon(3));
        double overallArea2 = Math.PI * 4 + (3 * Math.sqrt(3) / 2) * 9;
        assertEquals(overallArea2, LuxoftUtils.calculateOverallArea(list2), delta);

        ArrayList<Figure> list3 = new ArrayList<Figure>();
        list3.add(new Circle(0));
        list3.add(new Square(0));
        list3.add(new Hexagon(0));
        assertEquals(0.00, LuxoftUtils.calculateOverallArea(list3), delta);
    }
View Full Code Here

    @Test
    public void calculateOverallAreaTest() {
        List<Figure> figures = new ArrayList<Figure>();
        figures.add(new Circle(2d));
        figures.add(new Square(3d));
        figures.add(new Hexagon(4d));
        final double SUM_OF_SQUARES = 63.1355899d;
        Assert.assertEquals(SUM_OF_SQUARES, LuxoftUtils.calculateOverallArea(figures), DELTA);
    }
View Full Code Here

    @Test
    public void testCalculateOverallArea() {
        ArrayList<Figure> list1 = new ArrayList<Figure>();
        list1.add(new Circle(1));
        list1.add(new Square(2));
        list1.add(new Hexagon(3));
        double overallArea1 = Math.PI + 4 + (3 * Math.sqrt(3) / 2) * 9;
        assertEquals(overallArea1, LuxoftUtils.calculateOverallArea(list1), delta);

        ArrayList<Figure> list2 = new ArrayList<Figure>();
        list1.add(new Square(5));
        list1.add(new Hexagon(7));
        list1.add(new Circle(9));
        list1.add(new Square(8));
        double overallArea2 = Math.PI * 25 (3 * Math.sqrt(3) / 2) * 49 + Math.PI * 81 + 64;
    }
View Full Code Here

        double overallArea2 = Math.PI * 4 + (3 * Math.sqrt(3) / 2) * 9;
        assertEquals(overallArea2, LuxoftUtils.calculateOverallArea(list2), delta);

        ArrayList<Figure> list3 = new ArrayList<Figure>();
        list3.add(new Circle(0));
        list3.add(new Square(0));
        list3.add(new Hexagon(0));
        assertEquals(0.00, LuxoftUtils.calculateOverallArea(list3), delta);
    }
View Full Code Here

TOP

Related Classes of com.luxoft.dnepr.courses.unit2.model.Circle

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.