Package org.arquillian.recorder.reporter.model.entry

Examples of org.arquillian.recorder.reporter.model.entry.VideoEntry


        TestClassReport testClassReport = new TestClassReport();
        testClassReport.setTestClassName(FakeTestClass.class.getName());
        reporter.getLastTestSuiteReport().getTestClassReports().add(testClassReport);
        reporter.setTestClassReport(testClassReport);

        VideoEntry videoEntry = new VideoEntry();
        videoEntry.setPath(configuration.getRootDir().getAbsolutePath() + "/some/someVideo.mp4");
        videoEntry.setSize("54M");
        reporter.getReporterCursor().getCursor().getPropertyEntries().add(videoEntry);

        TestMethodReport testMethodReport = new TestMethodReport();
        testMethodReport.setName("someTestMethod");
        TestResult testResult = TestResult.passed();
View Full Code Here


        TestClassReport testClassReport = new TestClassReport();
        testClassReport.setTestClassName(FakeTestClass.class.getName());
        reporter.getLastTestSuiteReport().getTestClassReports().add(testClassReport);
        reporter.setTestClassReport(testClassReport);

        VideoEntry videoEntry = new VideoEntry();
        videoEntry.setPath(configuration.getRootDir().getAbsolutePath() + "/some/someVideo.mp4");
        videoEntry.setSize("54M");
        reporter.getReporterCursor().getCursor().getPropertyEntries().add(videoEntry);

        TestMethodReport testMethodReport = new TestMethodReport();
        testMethodReport.setName("someTestMethod");
        TestResult testResult = TestResult.passed();
View Full Code Here

        TestClassReport testClassReport = new TestClassReport();
        testClassReport.setTestClassName(FakeTestClass.class.getName());
        reporter.getLastTestSuiteReport().getTestClassReports().add(testClassReport);
        reporter.setTestClassReport(testClassReport);

        VideoEntry videoEntry = new VideoEntry();
        videoEntry.setPath("some/someVideo.mp4");
        videoEntry.setSize("54M");
        reporter.getReporterCursor().getCursor().getPropertyEntries().add(videoEntry);

        TestMethodReport testMethodReport = new TestMethodReport();
        testMethodReport.setName("someTestMethod");
        TestResult testResult = TestResult.passed();
View Full Code Here

        takenResourceRegister.get().addReported(video);
        propertyReportEvent.fire(new PropertyReportEvent(getVideoEntry(video)));
    }

    private PropertyEntry getVideoEntry(Video video) {
        VideoEntry videoEntry = new VideoEntry();
        videoEntry.setPath(video.getResource().getAbsolutePath());
        videoEntry.setType(video.getResourceType().toString());
        videoEntry.setSize(Long.toString(video.getResource().length()));
        videoEntry.setHeight(video.getHeight());
        videoEntry.setWidth(video.getWidth());
        return videoEntry;
    }
View Full Code Here

        TakenResourceRegister register = takenResourceRegister.get();

        for (Video video : register.getTakenVideos()) {
            if (!register.getReportedVideos().contains(video)) {

                VideoEntry entry = new VideoEntry();
                entry.setPath(video.getResource().getAbsolutePath());
                entry.setType(video.getResourceType().toString());
                entry.setSize(Long.toString(video.getResource().length()));
                entry.setHeight(video.getHeight());
                entry.setWidth(video.getWidth());
                entry.setPhase(When.IN_TEST);

                reportEvent.fire(new PropertyReportEvent(entry));
            }
        }
View Full Code Here

     */
    private void normalizeFilePaths(Reportable report) {
        for (TestSuiteReport testSuiteReport : ((Report) report).getTestSuiteReports()) {
            for (PropertyEntry entry : testSuiteReport.getPropertyEntries()) {
                if (entry instanceof VideoEntry) {
                    VideoEntry e = (VideoEntry) entry;
                    e.setLink(e.getPath().substring(configuration.getRootDir().getAbsolutePath().length() + 1));
                }
            }
            for (TestClassReport testClassReport : testSuiteReport.getTestClassReports()) {
                for (PropertyEntry entry : testClassReport.getPropertyEntries()) {
                    if (entry instanceof VideoEntry) {
                        VideoEntry e = (VideoEntry) entry;
                        e.setLink(e.getPath().substring(configuration.getRootDir().getAbsolutePath().length() + 1));
                    }
                }
                for (TestMethodReport testMethodReport : testClassReport.getTestMethodReports()) {
                    for (PropertyEntry entry : testMethodReport.getPropertyEntries()) {
                        if (entry instanceof VideoEntry) {
                            VideoEntry e = (VideoEntry) entry;
                            e.setLink(e.getPath().substring(configuration.getRootDir().getAbsolutePath().length() + 1));
                        } else if (entry instanceof ScreenshotEntry) {
                            ScreenshotEntry e = (ScreenshotEntry) entry;
                            e.setLink(e.getPath().substring(configuration.getRootDir().getAbsolutePath().length() + 1));
                        }
                    }
                }
            }
        }
View Full Code Here

        TestClassReport testClassReport = new TestClassReport();
        testClassReport.setTestClassName(FakeTestClass.class.getName());
        reporter.getLastTestSuiteReport().getTestClassReports().add(testClassReport);
        reporter.setTestClassReport(testClassReport);

        VideoEntry videoEntry = new VideoEntry();
        videoEntry.setPath(configuration.getRootDir().getAbsolutePath() + "/some/someVideo.mp4");
        videoEntry.setSize("54M");
        reporter.getReporterCursor().getCursor().getPropertyEntries().add(videoEntry);

        TestMethodReport testMethodReport = new TestMethodReport();
        testMethodReport.setName("someTestMethod");
        TestResult testResult = new TestResult();
View Full Code Here

     */
    protected void writeMedia(List<PropertyEntry> propertyEntries) throws IOException {

        for (PropertyEntry propertyEntry : propertyEntries) {
            if (propertyEntry instanceof VideoEntry) {
                VideoEntry videoEntry = (VideoEntry) propertyEntry;
                writeVideo(videoEntry);
            } else {
                if (propertyEntry instanceof ScreenshotEntry) {
                    ScreenshotEntry screenshotEntry = (ScreenshotEntry) propertyEntry;
                    writeScreenshot(screenshotEntry);
View Full Code Here

     */
    private void normalizeFilePaths(Reportable report) {
        for (TestSuiteReport testSuiteReport : ((Report) report).getTestSuiteReports()) {
            for (PropertyEntry entry : testSuiteReport.getPropertyEntries()) {
                if (entry instanceof VideoEntry) {
                    VideoEntry e = (VideoEntry) entry;
                    e.setLink(e.getPath().substring(configuration.getRootDir().getAbsolutePath().length() + 1));
                }
            }
            for (TestClassReport testClassReport : testSuiteReport.getTestClassReports()) {
                for (PropertyEntry entry : testClassReport.getPropertyEntries()) {
                    if (entry instanceof VideoEntry) {
                        VideoEntry e = (VideoEntry) entry;
                        e.setLink(e.getPath().substring(configuration.getRootDir().getAbsolutePath().length() + 1));
                    }
                }
                for (TestMethodReport testMethodReport : testClassReport.getTestMethodReports()) {
                    for (PropertyEntry entry : testMethodReport.getPropertyEntries()) {
                        if (entry instanceof VideoEntry) {
                            VideoEntry e = (VideoEntry) entry;
                            e.setLink(e.getPath().substring(configuration.getRootDir().getAbsolutePath().length() + 1));
                        } else if (entry instanceof ScreenshotEntry) {
                            ScreenshotEntry e = (ScreenshotEntry) entry;
                            e.setLink(e.getPath().substring(configuration.getRootDir().getAbsolutePath().length() + 1));
                        }
                    }
                }
            }
        }
View Full Code Here

        TestClassReport testClassReport = new TestClassReport();
        testClassReport.setTestClassName(FakeTestClass.class.getName());
        reporter.getLastTestSuiteReport().getTestClassReports().add(testClassReport);
        reporter.setTestClassReport(testClassReport);

        VideoEntry videoEntry = new VideoEntry();
        videoEntry.setPath("some/someVideo.mp4");
        videoEntry.setSize("54M");
        reporter.getReporterCursor().getCursor().getPropertyEntries().add(videoEntry);

        TestMethodReport testMethodReport = new TestMethodReport();
        testMethodReport.setName("someTestMethod");
        TestResult testResult = new TestResult();
View Full Code Here

TOP

Related Classes of org.arquillian.recorder.reporter.model.entry.VideoEntry

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.