Technical details
@Test
annotation public @interface Test { ... } |
|
Assert
class public class Assert { public static void assertTrue( String message, boolean condition) { ...} public static void assertEquals( long expected, long actual) { ...} ... }
<project ...> ... <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.13</version> <scope>test</scope> </dependency> ... </dependencies> ... </project>
Local: /home/goik/.m2/repository/junit/junit/4.13/junit-4.13.jar
> jar -tf junit-4.13.jar META-INF/ META-INF/MANIFEST.MF org/ org/junit/ ... org/junit/Assert.class ...
No. 128
Turning seconds into weeks, part 2
Q: |
This is a follow-up exercise to Turning seconds into weeks implementing a corresponding
Since the Furthermore individual weeks, days, hours, minutes and seconds shall be implemented as read-only values:
In other words: Instances of
In addition supply a so called copy constructor to allow for creating a new instance from an existing one:
Use the following unit tests to check your implementation's correctness:
|
||||||||
A: |