TestSegment.java 617 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
package mvd.jester.model;

import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

/**
 * SegmentTest
 */
public class TestSegment {

    @Test
    @DisplayName("Test if dynamic segments are constructed correctly.")
    public void testSegmentConstruction() {
        Segment s1 = new Segment(100, 10);
        Segment s2 = new Segment(9, 10);

        assertTrue(s1.getJobWcet() == 100);
        assertTrue(s1.getNumberOfJobs() == 10);

        assertTrue(s2.getJobWcet() == 9);
        assertTrue(s2.getNumberOfJobs() == 10);
    }
}