Gitignore + JUnit5 import fix
This commit is contained in:
@ -1,9 +1,6 @@
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class CardTest {
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class CardsTest {
|
||||
public Card newCard, card;
|
||||
public Cards cards;
|
||||
|
@ -1,19 +1,15 @@
|
||||
import static org.hamcrest.CoreMatchers.allOf;
|
||||
import static org.hamcrest.CoreMatchers.anyOf;
|
||||
import static org.hamcrest.CoreMatchers.hasItems;
|
||||
import static org.hamcrest.CoreMatchers.not;
|
||||
import static org.hamcrest.core.Is.is;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
|
||||
public class CoinsTest {
|
||||
|
||||
@Test
|
||||
public void test_getCoinAmount(){
|
||||
Coins coin = new Coins(10);
|
||||
assertTrue("Fehler getCoinAmmount ist negativ",coin.getCoinAmount() >= 0);
|
||||
assertTrue(coin.getCoinAmount() >= 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -23,7 +19,7 @@ public class CoinsTest {
|
||||
coin.addCoin(-10);
|
||||
fail("Erwartet NegativAmountException - addCoin");
|
||||
}catch (NegativAmountException negativAmountException) {
|
||||
assertThat(negativAmountException.getMessage(), is("negativAmountException"));
|
||||
assertTrue(negativAmountException.getMessage()=="negativAmountException");
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,7 +30,7 @@ public class CoinsTest {
|
||||
coin.removeCoin(-10);
|
||||
fail("Erwartet NegativAmountException - removeCoin");
|
||||
}catch (NegativAmountException negativAmountException) {
|
||||
assertThat(negativAmountException.getMessage(), is("negativAmountException"));
|
||||
assertTrue(negativAmountException.getMessage()=="negativAmountException");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,8 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
|
||||
public class PackageTest {
|
||||
private Cards newCards, cards, nochNewCards;
|
||||
|
18
src/test/java/SimpleCardTest.java
Normal file
18
src/test/java/SimpleCardTest.java
Normal file
@ -0,0 +1,18 @@
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
public class SimpleCardTest {
|
||||
|
||||
@Test
|
||||
@DisplayName("Test - getName()")
|
||||
public void test_getName(){
|
||||
//arrange
|
||||
Card mockedA = mock(Card.class); //Erstellt einen Mock
|
||||
String name = "Neuer Name";
|
||||
//act
|
||||
|
||||
//assert
|
||||
}
|
||||
}
|
@ -3,7 +3,8 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
|
||||
public class StackTest {
|
||||
private Cards newCards, cards, nochNewCards;
|
||||
|
@ -3,7 +3,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class StoreTest {
|
||||
|
||||
|
@ -3,7 +3,8 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
|
||||
public class TradingDealTest {
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
|
||||
public class UserTest {
|
||||
private TradingDeal tradingDeal;
|
||||
|
Reference in New Issue
Block a user