@@ -0,0 +1,2082 @@
+package org.zeroxlab.momome;%0A%0Aimport org.zeroxlab.momome.*;%0Aimport org.zeroxlab.momome.data.*;%0Aimport org.zeroxlab.momome.data.Item.ItemEntry;%0A%0Aimport org.json.JSONArray;%0Aimport org.json.JSONObject;%0Aimport org.json.JSONException;%0Aimport android.test.ActivityInstrumentationTestCase2;%0Aimport android.test.AndroidTestCase;%0Aimport android.content.res.AssetManager;%0Aimport android.util.Log;%0A%0Apublic class TestItem extends AndroidTestCase implements Momo %7B%0A%0A    private static String sTitle= %22TEST-Title%22;%0A%0A    private Item mItem;%0A    private Item mNoTitleItem;%0A%0A    public TestItem() %7B%0A        mItem = new Item(sTitle);%0A        mNoTitleItem = new Item();%0A    %7D%0A%0A    @Override%0A    protected void setUp() throws Exception %7B%0A        super.setUp();%0A    %7D%0A%0A    public void testTitle() %7B%0A        assertNotNull(mItem.getTitle());%0A        assertNotNull(mNoTitleItem.getTitle());%0A        assertEquals(sTitle, mItem.getTitle());%0A        assertEquals(Item.DEF_TITLE, mNoTitleItem.getTitle());%0A%0A        String blah = %22blahblah%22;%0A        mItem.setTitle(blah);%0A        assertEquals(blah, mItem.getTitle());%0A    %7D%0A%0A    public void testEntry() %7B%0A        mItem.addEntry(%22one%22, %22foo%22);%0A        mItem.addEntry(%22two%22, %22foo%22);%0A        mItem.addEntry(%22three%22, %22foo%22);%0A        assertEquals(3, mItem.getEntryCount());%0A%0A        Item.ItemEntry entry = mItem.getEntry(0); // it should be 'one'%0A        mItem.updateEntry(entry, %22two%22, %22blah%22); // modify the item%0A%0A        Item.ItemEntry modified = mItem.getEntry(0); // 'one' turns into 'two'%0A        assertEquals(%22two%22, modified.getName());%0A        assertEquals(3, mItem.getEntryCount());%0A%0A        ItemEntry onemore = new ItemEntry(%22XD%22, %22XD%22);%0A        mItem.updateEntry(onemore, %22xd%22, %22xd%22);%0A        assertEquals(4, mItem.getEntryCount());%0A        mItem.updateEntry(onemore, %22xd%22, %22xd%22);%0A        assertEquals(4, mItem.getEntryCount());%0A        mItem.addEntry(onemore);%0A        assertEquals(4, mItem.getEntryCount());%0A%0A        ItemEntry another = new ItemEntry(%22XD%22, %22XD%22);%0A        mItem.addEntry(another);%0A        assertEquals(5, mItem.getEntryCount());%0A    %7D%0A%7D%0A

add TestItem