Skip to content

When startDate is on Sat or Sun getMinutes() return 0 #1

@mercury77

Description

@mercury77

When I run this test I expect getMinutes() will return 60 minutes .
It instead returns 0.
Can you check please ?
Thanks in advance for you support

@Test
    public void testCalculatorIssues() {
        calculator = new WorkTimeCalculator(parse("02/15/2020 18:30"), parse("02/17/2020 10:30"));
        calculator.setWeekends(Calendar.SATURDAY, Calendar.SUNDAY);

        Assert.assertEquals(60, calculator.getMinutes(), 0);
    
    }

The same test as before but with differents hours and minutes values ,this time the test will pass

@Test
    public void testCalculatorIssue_two() {
        calculator = new WorkTimeCalculator(parse("02/15/2020 09:30"), parse("02/17/2020 10:30"));
        calculator.setWeekends(Calendar.SATURDAY, Calendar.SUNDAY);

        Assert.assertEquals(60, calculator.getMinutes(), 0);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions