Commit 297c19a5 authored by Grethe Sandstrak's avatar Grethe Sandstrak
Browse files

Replace SpillerTest.java

parent 22b155ce
...@@ -16,22 +16,22 @@ import static org.junit.Assert.*; ...@@ -16,22 +16,22 @@ import static org.junit.Assert.*;
* @author grethsan * @author grethsan
*/ */
public class SpillerTest { public class SpillerTest {
public SpillerTest() { public SpillerTest() {
} }
@BeforeClass @BeforeClass
public static void setUpClass() { public static void setUpClass() {
} }
@AfterClass @AfterClass
public static void tearDownClass() { public static void tearDownClass() {
} }
@Before @Before
public void setUp() { public void setUp() {
} }
@After @After
public void tearDown() { public void tearDown() {
} }
...@@ -88,16 +88,16 @@ public class SpillerTest { ...@@ -88,16 +88,16 @@ public class SpillerTest {
} }
/** /**
* Test of økAntallPoeng method, of class Spiller. * Test of okAntallPoeng method, of class Spiller.
*/ */
@Test @Test
public void testØkAntallPoeng() { public void testOkAntallPoeng() {
System.out.println("Spiller: okAntallPoeng"); System.out.println("Spiller: okAntallPoeng");
Spiller instance = new Spiller("Grethe"); Spiller instance = new Spiller("Grethe");
instance.økAntallPoeng(); instance.okAntallPoeng();
instance.økAntallPoeng(); instance.okAntallPoeng();
instance.økAntallPoeng(); instance.okAntallPoeng();
instance.økAntallPoeng(); instance.okAntallPoeng();
int expResult = 4; int expResult = 4;
int result = instance.getAntallPoeng(); int result = instance.getAntallPoeng();
assertEquals(expResult, result); assertEquals(expResult, result);
...@@ -116,4 +116,8 @@ public class SpillerTest { ...@@ -116,4 +116,8 @@ public class SpillerTest {
String result = instance.toString(); String result = instance.toString();
assertEquals(expResult, result); assertEquals(expResult, result);
} }
public static void main(String args[]) {
org.junit.runner.JUnitCore.main(SpillerTest.class.getName()); // tas med dersom textpad ikke er konfigurert
}
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment