-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathAlternativeTest.java
More file actions
41 lines (36 loc) · 975 Bytes
/
AlternativeTest.java
File metadata and controls
41 lines (36 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
/**
* Tests for class Alternative.
*
* @author Dr. Jody Paul
* @version 20241113.2
*/
public class AlternativeTest {
private Alternative alt01;
/**
* Set up the test fixture.
*/
@BeforeEach
public void setUp() {
alt01 = new Alternative("Alternative One descriptor");
}
@Test
public void getDescriptionTest() {
assertEquals("Alternative One descriptor", alt01.getDescriptor());
}
@Test
public void getFinalScoreTest() {
assertEquals(Alternative.DEFAULT_SCORE, alt01.getFinalScore());
}
@Test
public void setAndGetFinalScore() {
alt01.setFinalScore(42);
assertEquals(42, alt01.getFinalScore());
}
@Test
public void toStringTest() {
assertEquals("Alternative One descriptor == 0", alt01.toString());
}
}