software-testing/project_task_sheets/phase_05/project_phase05_tasks/DurationTest.java
2022-07-04 19:43:35 +02:00

18 lines
481 B
Java

import org.junit.Assert;
import org.junit.Test;
public class DurationTest {
@Test
public void testToStringCORMutation() {
// Killed 4,5
Assert.assertEquals("PT-0.999999999S",
new Duration(-1, 1).toString());
// Killed 1,3,4,6,7
Assert.assertEquals("PT-1S",
new Duration(-1, 0).toString());
// Killed 1,3,4,6,8
Assert.assertEquals("PT0.000000001S",
new Duration(0, 1).toString());
}
}