<commit_before>package com.funnyhatsoftware.spacedock.test;

import android.test.AndroidTestCase;

import com.funnyhatsoftware.spacedock.data.Captain;
import com.funnyhatsoftware.spacedock.data.Set;
import com.funnyhatsoftware.spacedock.data.Ship;
import com.funnyhatsoftware.spacedock.data.Universe;
import com.funnyhatsoftware.spacedock.data.Upgrade;

public class TestShip extends AndroidTestCase {
	Universe universe;

	public TestShip() {
		super();
	}

	public void setUp() {
		universe = Universe.getUniverse(getContext());
	}

	public void testLoad() {
		Ship entD = universe.ships.get("1001");
		assertNotNull("Couldn't get ship", entD);
		assertEquals(4, entD.getAttack());
		assertEquals("U.S.S. Enterprise-D", entD.getTitle());
		assertTrue("U.S.S. Enterprise-D should be unique", entD.getUnique());

		Captain picard = universe.captains.get("2001");
		assertNotNull("Couldn't get captain", picard);
		assertEquals(9, picard.getSkill());
		assertEquals("<NAME>", picard.getTitle());
		assertTrue("Picard should be unique", picard.getUnique());

		Upgrade romulanPilot = universe.upgrades.get("3102");
		assertNotNull("Couldn't get upgrade", romulanPilot);
		assertEquals("Romulan Pilot", romulanPilot.getTitle());
		assertEquals(2, romulanPilot.getCost());
		assertFalse("Romulan Pilot should not be unique",
				romulanPilot.getUnique());

		Set coreSet = universe.sets.get("71120");
		assertNotNull("Couldn't get core set", coreSet);
		assertEquals("Count of items in core set wrong", 30, coreSet.getItems()
				.size());

		Set reliantSet = universe.sets.get("71121");
		assertNotNull("Couldn't get core set", reliantSet);
		assertEquals("Count of items in reliant expansion wrong", 12,
				reliantSet.getItems().size());
	}<commit_msg>Add smoke test for flagships and resources.<commit_after>package com.funnyhatsoftware.spacedock.test;

import android.test.AndroidTestCase;

import com.funnyhatsoftware.spacedock.data.Captain;
import com.funnyhatsoftware.spacedock.data.Flagship;
import com.funnyhatsoftware.spacedock.data.Resource;
import com.funnyhatsoftware.spacedock.data.Set;
import com.funnyhatsoftware.spacedock.data.Ship;
import com.funnyhatsoftware.spacedock.data.Universe;
import com.funnyhatsoftware.spacedock.data.Upgrade;

public class TestShip extends AndroidTestCase {
	Universe universe;

	public TestShip() {
		super();
	}

	public void setUp() {
		universe = Universe.getUniverse(getContext());
	}

	public void testLoad() {
		Ship entD = universe.ships.get("1001");
		assertNotNull("Couldn't get ship", entD);
		assertEquals(4, entD.getAttack());
		assertEquals("U.S.S. Enterprise-D", entD.getTitle());
		assertTrue("U.S.S. Enterprise-D should be unique", entD.getUnique());

		Captain picard = universe.captains.get("2001");
		assertNotNull("Couldn't get captain", picard);
		assertEquals(9, picard.getSkill());
		assertEquals("<NAME>", picard.getTitle());
		assertTrue("Picard should be unique", picard.getUnique());

		Upgrade romulanPilot = universe.upgrades.get("3102");
		assertNotNull("Couldn't get upgrade", romulanPilot);
		assertEquals("Romulan Pilot", romulanPilot.getTitle());
		assertEquals(2, romulanPilot.getCost());
		assertFalse("Romulan Pilot should not be unique",
				romulanPilot.getUnique());

		Flagship fs = universe.flagships.get("6002");
		assertNotNull("Couldn't get flagship", fs);
		assertEquals("attack value wrong", 1, fs.getAttack());
		assertEquals("hull value wrong", 0, fs.getHull());
		assertEquals("faction wrong", "Independent", fs.getFaction());
		
		Resource tokens = universe.resources.get("4002");
		assertNotNull("Couldn't get resource", tokens);
		assertEquals("resource cost value wrong", 5, tokens.getCost());

		Set coreSet = universe.sets.get("71120");
		assertNotNull("Couldn't get core set", coreSet);
		assertEquals("Count of items in core set wrong", 30, coreSet.getItems()
				.size());

		Set reliantSet = universe.sets.get("71121");
		assertNotNull("Couldn't get core set", reliantSet);
		assertEquals("Count of items in reliant expansion wrong", 12,
				reliantSet.getItems().size());
	}
{'fraction_non_alphanumeric': 0.1404756067663643, 'fraction_numerical': 0.016915910762441776, 'mean_word_length': 5.666666666666667, 'pattern_counts': {'":': 0, '<': 5, '<?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': '937812', 'n_tokens_mistral': 1446, 'n_tokens_neox': 1272, 'n_words': 284}