mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-04-03 07:11:45 -04:00
display store and note on card summary view
Dutch translation provided by PanderMusubi Related issues: https://github.com/brarcher/loyalty-card-locker/issues/23 https://github.com/brarcher/loyalty-card-locker/issues/24
This commit is contained in:
@@ -51,7 +51,7 @@ public class LoyaltyCardCursorAdapterTest
|
||||
|
||||
|
||||
@Test
|
||||
public void TestCursorAdapter()
|
||||
public void TestCursorAdapterEmptyNote()
|
||||
{
|
||||
db.insertLoyaltyCard("store", "", "cardId", BarcodeFormat.UPC_A.toString());
|
||||
LoyaltyCard card = db.getLoyaltyCard(1);
|
||||
@@ -67,4 +67,25 @@ public class LoyaltyCardCursorAdapterTest
|
||||
|
||||
checkView(view, card.store, cardIdText);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void TestCursorAdapterWithNote()
|
||||
{
|
||||
db.insertLoyaltyCard("store", "note", "cardId", BarcodeFormat.UPC_A.toString());
|
||||
LoyaltyCard card = db.getLoyaltyCard(1);
|
||||
|
||||
Cursor cursor = db.getLoyaltyCardCursor();
|
||||
cursor.moveToFirst();
|
||||
|
||||
View view = createView(cursor);
|
||||
|
||||
final String storeNameAndNoteFormat = activity.getResources().getString(R.string.storeNameAndNoteFormat);
|
||||
String storeAndNoteText = String.format(storeNameAndNoteFormat, card.store, card.note);
|
||||
|
||||
final String cardIdLabel = activity.getResources().getString(R.string.cardId);
|
||||
final String cardIdFormat = activity.getResources().getString(R.string.cardIdFormat);
|
||||
String cardIdText = String.format(cardIdFormat, cardIdLabel, card.cardId);
|
||||
|
||||
checkView(view, storeAndNoteText, cardIdText);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user