mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
make GraphStreamView label times and job names
parse seconds to time string
This commit is contained in:
parent
bd59d9478c
commit
a94a492004
3 changed files with 97 additions and 42 deletions
|
|
@ -1,27 +1,25 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2014 Stefan Schroeder.
|
||||
*
|
||||
* Copyright (C) 2014 Stefan Schroeder
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3.0 of the License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Contributors:
|
||||
* Stefan Schroeder - initial API and implementation
|
||||
******************************************************************************/
|
||||
package jsprit.core.util;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class TimeTest {
|
||||
|
||||
@Test
|
||||
|
|
@ -164,4 +162,26 @@ public class TimeTest {
|
|||
assertEquals(1.,sec,0.01);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenSecIs3600_shouldReturnCorrectTimeString(){
|
||||
String time = Time.parseSecondsToTime(3600);
|
||||
System.out.println(time);
|
||||
assertEquals(3600.,Time.parseTimeToSeconds(time),0.01);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenSecIs4000_shouldReturnCorrectTimeString(){
|
||||
String time = Time.parseSecondsToTime(4000);
|
||||
System.out.println(time);
|
||||
assertEquals(4000.,Time.parseTimeToSeconds(time),0.01);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenSecIs86399_shouldReturnCorrectTimeString(){
|
||||
String time = Time.parseSecondsToTime(86399);
|
||||
System.out.println(time);
|
||||
assertEquals(86399.,Time.parseTimeToSeconds(time),0.01);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue