package pl.mg6.testsupport;

import junit.framework.TestCase;

import java.util.List;

import pl.mg6.testsupport.data.Simple;
import pl.mg6.testsupport.factory.SimpleFactory;

public class FactoryReparcelerTestCase extends TestCase {

    private final FactoryReparceler reparceler = new FactoryReparceler();

    public void testSimpleParcelableShouldBeEqual() {
        List<ReparcelingResult<Simple>> resultList = reparceler.reparcel(SimpleFactory.class, Simple.class);
        for (ReparcelingResult<Simple> result : resultList) {
            assertNotNull(result.getOriginal());
            assertNotNull(result.getReparceled());
            assertNotSame(result.getOriginal(), result.getReparceled());
            assertTrue(result.areEqual());
            assertNull(result.getError());
        }
    }
}

@@ -802,11 +802,453 @@
  %7D%0A    %7D
+%0A%0A    public void testFactoryReparcelerShouldFindAllMethods() %7B%0A        List%3CReparcelingResult%3CSimple%3E%3E resultList = reparceler.reparcel(SimpleFactory.class, Simple.class);%0A        assertEquals(3, resultList.size());%0A        assertEquals(%22withZero%22, resultList.get(2).getMethodName());%0A        assertEquals(%22withPerfectNumber%22, resultList.get(1).getMethodName());%0A        assertEquals(%22withMaxValue%22, resultList.get(0).getMethodName());%0A    %7D
 %0A%7D%0A

Test all methods are found by factory reparceler.