MCPcopy Create free account
hub / github.com/MenoData/Time4J / parse

Method parse

base/src/test/java/net/time4j/MachineTimeTest.java:557–565  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

555 }
556
557 @Test
558 public void parse() throws ParseException {
559 MachineTime.Formatter f =
560 MachineTime.Formatter.ofPattern("+hh:mm:ss");
561 MachineTime<TimeUnit> mt1 = f.parse("+27:30:05");
562 MachineTime<TimeUnit> mt2 = f.parse("-27:30:05");
563 assertThat(mt1, is(MachineTime.of(99005, TimeUnit.SECONDS)));
564 assertThat(mt2, is(MachineTime.of(-99005, TimeUnit.SECONDS)));
565 }
566
567 @Test
568 public void threetenConversion() {

Callers

nothing calls this directly

Calls 3

ofMethod · 0.95
parseMethod · 0.65
ofPatternMethod · 0.45

Tested by

no test coverage detected