blob: 2a6f4824ee3c42f646415c1b8a6f34fd5549854a (
plain)
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
41
42
43
44
45
|
package eu.equalparts.cardbase.decks;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.Test;
import eu.equalparts.cardbase.containers.ReferenceCardContainer;
public class ReferenceDeckTest {
private ReferenceDeck uut;
@Before
public void setUp() throws Exception {
uut = new ReferenceDeck();
}
/***********************************************************************************
* Typing
***********************************************************************************/
@Test
public void deckIsReferenceCardContainer() throws Exception {
assertTrue("Deck should be instance of ReferenceCardContainer.", uut instanceof ReferenceCardContainer);
}
/***********************************************************************************
* Name tests
***********************************************************************************/
@Test
public void deckHasName() throws Exception {
assertEquals("Deck should not have a name to begin with.", "", uut.getName());
uut.setName("Test Name");
assertEquals("Wrong name.", "Test Name", uut.getName());
}
@Test
public void deckNameInConstructor() throws Exception {
uut = new ReferenceDeck("Another Test");
assertEquals("Deck should have a name to begin with.", "Another Test", uut.getName());
}
}
|