Examples of formatMillis()


Examples of org.jbehave.core.reporters.TemplateableViewGenerator.TimeFormatter.formatMillis()

    public void shouldFormatTimeDurantionInMillis(){
        long s = 1000;
        long m = 60 * s;
        long h = 60 * m;
        TimeFormatter timeFormatter = new TimeFormatter();
        assertThat(timeFormatter.formatMillis(0), equalTo("00:00:00.000"));
        assertThat(timeFormatter.formatMillis(1), equalTo("00:00:00.001"));
        assertThat(timeFormatter.formatMillis(10), equalTo("00:00:00.010"));
        assertThat(timeFormatter.formatMillis(100), equalTo("00:00:00.100"));
        assertThat(timeFormatter.formatMillis(2*s+1), equalTo("00:00:02.001"));
        assertThat(timeFormatter.formatMillis(3*m+20*s+1), equalTo("00:03:20.001"));
View Full Code Here

Examples of org.jbehave.core.reporters.TemplateableViewGenerator.TimeFormatter.formatMillis()

        long s = 1000;
        long m = 60 * s;
        long h = 60 * m;
        TimeFormatter timeFormatter = new TimeFormatter();
        assertThat(timeFormatter.formatMillis(0), equalTo("00:00:00.000"));
        assertThat(timeFormatter.formatMillis(1), equalTo("00:00:00.001"));
        assertThat(timeFormatter.formatMillis(10), equalTo("00:00:00.010"));
        assertThat(timeFormatter.formatMillis(100), equalTo("00:00:00.100"));
        assertThat(timeFormatter.formatMillis(2*s+1), equalTo("00:00:02.001"));
        assertThat(timeFormatter.formatMillis(3*m+20*s+1), equalTo("00:03:20.001"));
        assertThat(timeFormatter.formatMillis(44*h+33*m+22*s+1), equalTo("44:33:22.001"));
View Full Code Here

Examples of org.jbehave.core.reporters.TemplateableViewGenerator.TimeFormatter.formatMillis()

        long m = 60 * s;
        long h = 60 * m;
        TimeFormatter timeFormatter = new TimeFormatter();
        assertThat(timeFormatter.formatMillis(0), equalTo("00:00:00.000"));
        assertThat(timeFormatter.formatMillis(1), equalTo("00:00:00.001"));
        assertThat(timeFormatter.formatMillis(10), equalTo("00:00:00.010"));
        assertThat(timeFormatter.formatMillis(100), equalTo("00:00:00.100"));
        assertThat(timeFormatter.formatMillis(2*s+1), equalTo("00:00:02.001"));
        assertThat(timeFormatter.formatMillis(3*m+20*s+1), equalTo("00:03:20.001"));
        assertThat(timeFormatter.formatMillis(44*h+33*m+22*s+1), equalTo("44:33:22.001"));
    }
View Full Code Here

Examples of org.jbehave.core.reporters.TemplateableViewGenerator.TimeFormatter.formatMillis()

        long h = 60 * m;
        TimeFormatter timeFormatter = new TimeFormatter();
        assertThat(timeFormatter.formatMillis(0), equalTo("00:00:00.000"));
        assertThat(timeFormatter.formatMillis(1), equalTo("00:00:00.001"));
        assertThat(timeFormatter.formatMillis(10), equalTo("00:00:00.010"));
        assertThat(timeFormatter.formatMillis(100), equalTo("00:00:00.100"));
        assertThat(timeFormatter.formatMillis(2*s+1), equalTo("00:00:02.001"));
        assertThat(timeFormatter.formatMillis(3*m+20*s+1), equalTo("00:03:20.001"));
        assertThat(timeFormatter.formatMillis(44*h+33*m+22*s+1), equalTo("44:33:22.001"));
    }
   
View Full Code Here

Examples of org.jbehave.core.reporters.TemplateableViewGenerator.TimeFormatter.formatMillis()

        TimeFormatter timeFormatter = new TimeFormatter();
        assertThat(timeFormatter.formatMillis(0), equalTo("00:00:00.000"));
        assertThat(timeFormatter.formatMillis(1), equalTo("00:00:00.001"));
        assertThat(timeFormatter.formatMillis(10), equalTo("00:00:00.010"));
        assertThat(timeFormatter.formatMillis(100), equalTo("00:00:00.100"));
        assertThat(timeFormatter.formatMillis(2*s+1), equalTo("00:00:02.001"));
        assertThat(timeFormatter.formatMillis(3*m+20*s+1), equalTo("00:03:20.001"));
        assertThat(timeFormatter.formatMillis(44*h+33*m+22*s+1), equalTo("44:33:22.001"));
    }
   
}
View Full Code Here

Examples of org.jbehave.core.reporters.TemplateableViewGenerator.TimeFormatter.formatMillis()

        assertThat(timeFormatter.formatMillis(0), equalTo("00:00:00.000"));
        assertThat(timeFormatter.formatMillis(1), equalTo("00:00:00.001"));
        assertThat(timeFormatter.formatMillis(10), equalTo("00:00:00.010"));
        assertThat(timeFormatter.formatMillis(100), equalTo("00:00:00.100"));
        assertThat(timeFormatter.formatMillis(2*s+1), equalTo("00:00:02.001"));
        assertThat(timeFormatter.formatMillis(3*m+20*s+1), equalTo("00:03:20.001"));
        assertThat(timeFormatter.formatMillis(44*h+33*m+22*s+1), equalTo("44:33:22.001"));
    }
   
}
View Full Code Here

Examples of org.jbehave.core.reporters.TemplateableViewGenerator.TimeFormatter.formatMillis()

        assertThat(timeFormatter.formatMillis(1), equalTo("00:00:00.001"));
        assertThat(timeFormatter.formatMillis(10), equalTo("00:00:00.010"));
        assertThat(timeFormatter.formatMillis(100), equalTo("00:00:00.100"));
        assertThat(timeFormatter.formatMillis(2*s+1), equalTo("00:00:02.001"));
        assertThat(timeFormatter.formatMillis(3*m+20*s+1), equalTo("00:03:20.001"));
        assertThat(timeFormatter.formatMillis(44*h+33*m+22*s+1), equalTo("44:33:22.001"));
    }
   
}
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.