Package org.jbehave.core.reporters.TemplateableViewGenerator

Examples of org.jbehave.core.reporters.TemplateableViewGenerator.Report


    public void shouldCountEvents(){
        // Given
        FreemarkerViewGenerator generator = new FreemarkerViewGenerator();

        // When
        Report report = mock(Report.class);
        Properties stats = new Properties();
        stats.setProperty("found", "1");
        when(report.asProperties("stats")).thenReturn(stats);

        // Then
        assertThat(generator.count("found", asList(report)), equalTo(1));
        assertThat(generator.count("notFound", asList(report)), equalTo(0));
       
View Full Code Here


    @Test
    public void shouldHandleInvalidReportFile(){
        // Given
        Map<String, File> filesByFormat = new HashMap<String, File>();
        filesByFormat.put("format", null);
        Report report = new Report("name", filesByFormat);

        // When
        Properties properties = report.asProperties("format");

        // Then
        assertThat(properties.size(), equalTo(0));
       
    }
View Full Code Here

TOP

Related Classes of org.jbehave.core.reporters.TemplateableViewGenerator.Report

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.