Package org.dayatang.domain.entity

Examples of org.dayatang.domain.entity.MyEntity


    @Mock
    private EntityRepository repository;

    @Before
    public void setUp() throws Exception {
        instance = new MyEntity();
        MockitoAnnotations.initMocks(this);
        AbstractEntity.setRepository(repository);
    }
View Full Code Here


    @Test
    public void testExisted() {
        assertFalse(instance.existed());

        instance.setId(3L);
        MyEntity newEntity = new MyEntity("abc");
        when(repository.get(MyEntity.class, 3L)).thenReturn(newEntity);
        assertTrue(instance.existed());
    }
View Full Code Here

    /**
     * Test of getUnmodified method, of class AbstractEntity.
     */
    @Test
    public void testGetUnmodified() {
        MyEntity entity2 = new MyEntity("nnn");
        when(repository.getUnmodified(MyEntity.class, instance)).thenReturn(entity2);
        assertEquals(entity2, AbstractEntity.getUnmodified(MyEntity.class, instance));
    }
View Full Code Here

TOP

Related Classes of org.dayatang.domain.entity.MyEntity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.