Examples of inMinutes()


Examples of com.google.code.tempusfugit.temporal.Duration.inMinutes()

    @Test
    public void convertSeconds() {
        Duration duration = seconds(60);
        assertThat(duration.inMillis(), is(60000L));
        assertThat(duration.inSeconds(), is(60L));
        assertThat(duration.inMinutes(), is(1L));
        assertThat(duration.inHours(), is(0L));
        assertThat(duration.inDays(), is(0L));
    }

    @Test
View Full Code Here

Examples of com.google.code.tempusfugit.temporal.Duration.inMinutes()

    @Test
    public void convertSecondsRoundingResult() {
        Duration duration = seconds(95);
        assertThat(duration.inMillis(), is(95000L));
        assertThat(duration.inSeconds(), is(95L));
        assertThat(duration.inMinutes(), is(1L));
        assertThat(duration.inHours(), is(0L));
        assertThat(duration.inDays(), is(0L));
    }

    @Test
View Full Code Here

Examples of com.google.code.tempusfugit.temporal.Duration.inMinutes()

    @Test
    public void convertMinutes() {
        Duration duration = minutes(50);
        assertThat(duration.inMillis(), is(3000000L));
        assertThat(duration.inSeconds(), is(3000L));
        assertThat(duration.inMinutes(), is(50L));
        assertThat(duration.inHours(), is(0L));
        assertThat(duration.inDays(), is(0L));
    }

    @Test
View Full Code Here

Examples of com.google.code.tempusfugit.temporal.Duration.inMinutes()

    @Test
    public void conversionHours() {
        Duration duration = hours(24);
        assertThat(duration.inMillis(), is(86400000L));
        assertThat(duration.inSeconds(), is(86400L));
        assertThat(duration.inMinutes(), is(1440L));
        assertThat(duration.inHours(), is(24L));
        assertThat(duration.inDays(), is(1L));
    }

    @Test
View Full Code Here

Examples of com.google.code.tempusfugit.temporal.Duration.inMinutes()

    @Test
    public void convertDays() {
        Duration duration = Duration.days(10L);
        assertThat(duration.inDays(), is(10L));
        assertThat(duration.inHours(), is(duration.inDays() * HOURS_IN_A_DAY));
        assertThat(duration.inMinutes(), is(duration.inHours() * MINUTES_IN_AN_HOUR));
        assertThat(duration.inSeconds(), is(duration.inMinutes() * SECONDS_IN_A_MINUTE));
        assertThat(duration.inMillis(), is(duration.inSeconds() * MILLIS_IN_A_SECOND));
    }

    @Test
View Full Code Here

Examples of com.google.code.tempusfugit.temporal.Duration.inMinutes()

    public void convertDays() {
        Duration duration = Duration.days(10L);
        assertThat(duration.inDays(), is(10L));
        assertThat(duration.inHours(), is(duration.inDays() * HOURS_IN_A_DAY));
        assertThat(duration.inMinutes(), is(duration.inHours() * MINUTES_IN_AN_HOUR));
        assertThat(duration.inSeconds(), is(duration.inMinutes() * SECONDS_IN_A_MINUTE));
        assertThat(duration.inMillis(), is(duration.inSeconds() * MILLIS_IN_A_SECOND));
    }

    @Test
    public void canAddDurations() {
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.