@@ -0,0 +1,1269 @@
+package net.formula97.android.apcupscountdown.test;%0A%0Aimport android.content.Context;%0A%0Aimport android.test.InstrumentationTestCase;%0A%0Aimport net.formula97.android.apcupscountdown.DateDeltas;%0A%0Aimport java.util.Calendar;%0A%0Apublic class DateDeltasTest extends InstrumentationTestCase %7B%0A%0A    private Context mContext;%0A%0A    public void setUp() throws Exception %7B%0A        super.setUp();%0A        mContext = getInstrumentation().getTargetContext().getApplicationContext();%0A    %7D%0A%0A    public void tearDown() throws Exception %7B%0A%0A    %7D%0A%0A    public void testGetDeltas() throws Exception %7B%0A        Calendar from = Calendar.getInstance();%0A        Calendar to =(Calendar)from.clone();%0A        to.add(Calendar.DAY_OF_MONTH, 1);%0A        to.add(Calendar.MINUTE, 1);%0A%0A        DateDeltas deltas = new DateDeltas(mContext);%0A        String actual = deltas.getDeltas(from, to);%0A%0A        String expected = %221day(s) 0hour 1min.%22;%0A%0A        assertEquals(%221%E6%97%A5%E3%81%A81%E5%88%86%E5%BE%8C%E3%81%AF%E3%80%8C1day(s) 0hour 1min.%E3%80%8D%E3%81%A8%E8%A1%A8%E7%A4%BA%E3%81%95%E3%82%8C%E3%82%8B%22, expected, actual);%0A    %7D%0A%0A    public void testGetEstimated() throws Exception %7B%0A        Calendar now = Calendar.getInstance();%0A        now.add(Calendar.HOUR_OF_DAY, 1);%0A%0A        DateDeltas deltas = new DateDeltas(mContext);%0A%0A        assertEquals(%223600%E7%A7%92%E5%BE%8C%E3%81%AF1%E6%99%82%E9%96%93%E5%BE%8C%E3%81%A8%E4%BA%88%E6%B8%AC%E3%81%95%E3%82%8C%E3%82%8B%22, deltas.getEstimated(3600), now);%0A    %7D%0A%7D

テストコード作成の練習として、ある種ゆるふわなテストコードを書いてみた。