Gitignore + JUnit5 import fix
This commit is contained in:
		
							
								
								
									
										23
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					# Compiled class file
 | 
				
			||||||
 | 
					*.class
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Log file
 | 
				
			||||||
 | 
					*.log
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# BlueJ files
 | 
				
			||||||
 | 
					*.ctxt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Mobile Tools for Java (J2ME)
 | 
				
			||||||
 | 
					.mtj.tmp/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Package Files #
 | 
				
			||||||
 | 
					*.jar
 | 
				
			||||||
 | 
					*.war
 | 
				
			||||||
 | 
					*.nar
 | 
				
			||||||
 | 
					*.ear
 | 
				
			||||||
 | 
					*.zip
 | 
				
			||||||
 | 
					*.tar.gz
 | 
				
			||||||
 | 
					*.rar
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
 | 
				
			||||||
 | 
					hs_err_pid*
 | 
				
			||||||
							
								
								
									
										16
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								pom.xml
									
									
									
									
									
								
							@@ -8,18 +8,22 @@
 | 
				
			|||||||
    <artifactId>MTCG</artifactId>
 | 
					    <artifactId>MTCG</artifactId>
 | 
				
			||||||
    <version>1.0-SNAPSHOT</version>
 | 
					    <version>1.0-SNAPSHOT</version>
 | 
				
			||||||
    <dependencies>
 | 
					    <dependencies>
 | 
				
			||||||
        <dependency>
 | 
					 | 
				
			||||||
            <groupId>junit</groupId>
 | 
					 | 
				
			||||||
            <artifactId>junit</artifactId>
 | 
					 | 
				
			||||||
            <version>RELEASE</version>
 | 
					 | 
				
			||||||
            <scope>test</scope>
 | 
					 | 
				
			||||||
        </dependency>
 | 
					 | 
				
			||||||
        <dependency>
 | 
					        <dependency>
 | 
				
			||||||
            <groupId>org.junit.jupiter</groupId>
 | 
					            <groupId>org.junit.jupiter</groupId>
 | 
				
			||||||
            <artifactId>junit-jupiter</artifactId>
 | 
					            <artifactId>junit-jupiter</artifactId>
 | 
				
			||||||
            <version>RELEASE</version>
 | 
					            <version>RELEASE</version>
 | 
				
			||||||
            <scope>test</scope>
 | 
					            <scope>test</scope>
 | 
				
			||||||
        </dependency>
 | 
					        </dependency>
 | 
				
			||||||
 | 
					        <dependency>
 | 
				
			||||||
 | 
					            <groupId>org.mockito</groupId>
 | 
				
			||||||
 | 
					            <artifactId>mockito-core</artifactId>
 | 
				
			||||||
 | 
					            <version>3.5.13</version>
 | 
				
			||||||
 | 
					        </dependency>
 | 
				
			||||||
 | 
					        <dependency>
 | 
				
			||||||
 | 
					            <groupId>org.mockito</groupId>
 | 
				
			||||||
 | 
					            <artifactId>mockito-junit-jupiter</artifactId>
 | 
				
			||||||
 | 
					            <version>3.5.13</version>
 | 
				
			||||||
 | 
					        </dependency>
 | 
				
			||||||
    </dependencies>
 | 
					    </dependencies>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,9 +1,6 @@
 | 
				
			|||||||
import org.junit.Test;
 | 
					import org.junit.jupiter.api.Test;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import static org.junit.jupiter.api.Assertions.assertTrue;
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import static org.junit.Assert.*;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class CardTest {
 | 
					public class CardTest {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,9 @@
 | 
				
			|||||||
import org.junit.jupiter.api.BeforeEach;
 | 
					import org.junit.jupiter.api.BeforeEach;
 | 
				
			||||||
import org.junit.jupiter.api.Test;
 | 
					import org.junit.jupiter.api.Test;
 | 
				
			||||||
import static org.junit.Assert.assertTrue;
 | 
					 | 
				
			||||||
import java.util.ArrayList;
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import static org.junit.jupiter.api.Assertions.assertTrue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class CardsTest {
 | 
					public class CardsTest {
 | 
				
			||||||
    public Card newCard, card;
 | 
					    public Card newCard, card;
 | 
				
			||||||
    public Cards cards;
 | 
					    public Cards cards;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,19 +1,15 @@
 | 
				
			|||||||
import static org.hamcrest.CoreMatchers.allOf;
 | 
					import org.junit.jupiter.api.Test;
 | 
				
			||||||
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 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 {
 | 
					public class CoinsTest {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Test
 | 
					    @Test
 | 
				
			||||||
    public void test_getCoinAmount(){
 | 
					    public void test_getCoinAmount(){
 | 
				
			||||||
        Coins coin = new Coins(10);
 | 
					        Coins coin = new Coins(10);
 | 
				
			||||||
        assertTrue("Fehler getCoinAmmount ist negativ",coin.getCoinAmount() >= 0);
 | 
					        assertTrue(coin.getCoinAmount() >= 0);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Test
 | 
					    @Test
 | 
				
			||||||
@@ -23,7 +19,7 @@ public class CoinsTest {
 | 
				
			|||||||
            coin.addCoin(-10);
 | 
					            coin.addCoin(-10);
 | 
				
			||||||
            fail("Erwartet NegativAmountException - addCoin");
 | 
					            fail("Erwartet NegativAmountException - addCoin");
 | 
				
			||||||
        }catch (NegativAmountException negativAmountException) {
 | 
					        }catch (NegativAmountException negativAmountException) {
 | 
				
			||||||
            assertThat(negativAmountException.getMessage(), is("negativAmountException"));
 | 
					            assertTrue(negativAmountException.getMessage()=="negativAmountException");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -34,7 +30,7 @@ public class CoinsTest {
 | 
				
			|||||||
            coin.removeCoin(-10);
 | 
					            coin.removeCoin(-10);
 | 
				
			||||||
            fail("Erwartet NegativAmountException - removeCoin");
 | 
					            fail("Erwartet NegativAmountException - removeCoin");
 | 
				
			||||||
        }catch (NegativAmountException negativAmountException) {
 | 
					        }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 java.util.ArrayList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import static org.junit.Assert.assertTrue;
 | 
					import static org.junit.jupiter.api.Assertions.assertTrue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class PackageTest {
 | 
					public class PackageTest {
 | 
				
			||||||
    private Cards newCards, cards, nochNewCards;
 | 
					    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 java.util.ArrayList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import static org.junit.Assert.assertTrue;
 | 
					import static org.junit.jupiter.api.Assertions.assertTrue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class StackTest {
 | 
					public class StackTest {
 | 
				
			||||||
    private Cards newCards, cards, nochNewCards;
 | 
					    private Cards newCards, cards, nochNewCards;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@ import org.junit.jupiter.api.Test;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import java.util.ArrayList;
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import static org.junit.Assert.assertTrue;
 | 
					import static org.junit.jupiter.api.Assertions.assertTrue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class StoreTest {
 | 
					public class StoreTest {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,8 @@ import org.junit.jupiter.api.Test;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import java.util.ArrayList;
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import static org.junit.Assert.assertTrue;
 | 
					import static org.junit.jupiter.api.Assertions.assertTrue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class TradingDealTest {
 | 
					public class TradingDealTest {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,9 +1,10 @@
 | 
				
			|||||||
import org.junit.Test;
 | 
					 | 
				
			||||||
import org.junit.jupiter.api.BeforeEach;
 | 
					import org.junit.jupiter.api.BeforeEach;
 | 
				
			||||||
 | 
					import org.junit.jupiter.api.Test;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.util.ArrayList;
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import static org.junit.Assert.assertTrue;
 | 
					import static org.junit.jupiter.api.Assertions.assertTrue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class UserTest {
 | 
					public class UserTest {
 | 
				
			||||||
    private TradingDeal tradingDeal;
 | 
					    private TradingDeal tradingDeal;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user