package app.android.gambit.test;


import app.android.gambit.local.Card;


public class CardTests extends DatabaseTestCase
{
	private static final String DECK_TITLE = "Title";
	private static final String CARD_BACK_SIDE_TEXT = "Back text";
	private static final String CARD_FRONT_SIDE_TEXT = "Front text";

	private Card card;

	@Override
	protected void setUp() throws Exception {
		super.setUp();

		card = decks.createDeck(DECK_TITLE).createCard(CARD_FRONT_SIDE_TEXT, CARD_BACK_SIDE_TEXT);
	}

	public void testGetFrontSideText() {
		assertEquals(CARD_FRONT_SIDE_TEXT, card.getFrontSideText());
	}

	public void testGetBackSideText() {
		assertEquals(CARD_BACK_SIDE_TEXT, card.getBackSideText());
	}

	public void testSetFrontSideText() {
		String newFrontSideText = "New front side text";

		card.setFrontSideText(newFrontSideText);

		assertEquals(newFrontSideText, card.getFrontSideText());
	}

	public void testSetBackSideText() {
		String newBackSideText = "New back side text";

		card.setBackSideText(newBackSideText);

		assertEquals(newBackSideText, card.getBackSideText());
	}
}

@@ -165,13 +165,12 @@
  = %22
-Title
+deck
 %22;%0A%09
@@ -224,13 +224,18 @@
  = %22
-B
+b
 ack 
+side 
 text
@@ -294,14 +294,19 @@
  = %22
-F
+f
 ront 
+side 
 text
@@ -495,24 +495,113 @@
 _TEXT);%0A%09%7D%0A%0A
+%09public void testGetId() %7B%0A%09%09long cardId = card.getId();%0A%0A%09%09assertTrue(cardId %3E= 0);%0A%09%7D%0A%0A
 %09public void
@@ -865,29 +865,53 @@
 t = 
-%22New front side text%22
+String.format(%22new %25s%22, CARD_FRONT_SIDE_TEXT)
 ;%0A%0A%09
@@ -1084,28 +1084,52 @@
 t = 
-%22New back side text%22
+String.format(%22new %25s%22, CARD_BACK_SIDE_TEXT)
 ;%0A%0A%09

Add id testing for card and change card text generation a bit.