<commit_before>package testing;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

import setGame.Card;
import enums.Color;
import enums.Number;
import enums.Shading;
import enums.Shape;

public class CardTest {

	@Before
	public void setUp() throws Exception {
	}

	@Test
	public void initCardTest() {
		Card card = new Card(Color.RED, Shape.SQUIGGLE, Shading.SOLID, Number.TWO);
		assertEquals(Color.RED, card.getColor());
		assertEquals(Shape.SQUIGGLE, card.getShape());
		assertEquals(Shading.SOLID, card.getShading());
		assertEquals(Number.TWO, card.getNumber());
	
	}
}<commit_msg>added test for generating random cards<commit_after>package testing;

import static org.junit.Assert.*;

import java.util.HashSet;

import org.junit.Before;
import org.junit.Test;

import setGame.Card;
import enums.Color;
import enums.Number;
import enums.Shading;
import enums.Shape;

public class CardTest {

    @Before
    public void setUp() throws Exception {
    }

    @Test
    public void initCardTest() {
        Card card = new Card(Color.RED, Shape.SQUIGGLE, Shading.SOLID, Number.TWO);
        assertEquals(Color.RED, card.getColor());
        assertEquals(Shape.SQUIGGLE, card.getShape());
        assertEquals(Shading.SOLID, card.getShading());
        assertEquals(Number.TWO, card.getNumber());
    }

    @Test
    public void randomCardTest() {
        boolean gotBadLuck = false;
        for (int k = 0; k < 10; k++) {
            HashSet<Card> cards = new HashSet<Card>();
            for (int i = 0; i < 10; i++) {
                cards.add(Card.generateRandomCard());
            }
            // probably unique
            if (cards.size() < 9) {
                if (gotBadLuck) {
                    fail("not sufficiently random");
                }
                gotBadLuck = true;
            }
        }
        // if hasn't failed by here, card is sufficently random
    }
}
{'fraction_non_alphanumeric': 0.11917098445595854, 'fraction_numerical': 0.003626943005181347, 'mean_word_length': 2.6161048689138577, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2234950', 'n_tokens_mistral': 620, 'n_tokens_neox': 583, 'n_words': 148}