Examples of ResultFullTestIdComparator


Examples of be.pw999.jape.models.comparator.ResultFullTestIdComparator

                header.createCell(2).setCellValue("Test Description");
                header.createCell(3).setCellValue("Test Time (ms)");


                int l = entry.getValue().size();
                Collections.sort(entry.getValue(), new ResultFullTestIdComparator());
                for (int i = 0; i < l; ++i) {
                    Result result = entry.getValue().get(i);
                    double testId = TestUtils.getTestId(result.getDeclaringClass(), result.getDeclaredMethod());
                    String description = ReflectionUtils.getAnnotation(Test.class, result.getDeclaredMethod()).description();
                    double time = result.getDuration();
                    Row resultRow = sheet.createRow(i + 1);
                    resultRow.createCell(0).setCellValue(testId);
                    resultRow.createCell(1).setCellValue(result.getDeclaringClass().getSimpleName());
                    resultRow.createCell(2).setCellValue(description);
                    resultRow.createCell(3).setCellValue(time);
                }
                sheet.autoSizeColumn(0);
                sheet.autoSizeColumn(1);
                sheet.autoSizeColumn(2);
                sheet.autoSizeColumn(3);
            }


            //Comparable export
            for (Map.Entry<String, List<Result>> entry : results.entrySet()) {
                Sheet sheet = getOrCreateSheet(entry.getKey() + "(group)", wb);
                log.info("Creating sheet " + sheet.getSheetName());

                int l = entry.getValue().size();
                Collections.sort(entry.getValue(), new ResultFullTestIdComparator());

                //Find all test descriptions and class names
                Set<String> testDescriptions = new TreeSet<String>();
                Set<String> classNames = new TreeSet<String>();
                Map<String, Double> minVal = new HashMap<String, Double>();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.