Package org.apache.cayenne.map.event

Examples of org.apache.cayenne.map.event.MapEvent


*/
public class ModelerEventTest extends TestCase {

    public void testConstructor1() throws Exception {
      Object src = new Object();
      MapEvent e = new TestMapEvent(src);
      assertSame(src, e.getSource());
    }
View Full Code Here


      MapEvent e = new TestMapEvent(src);
      assertSame(src, e.getSource());
    }
   
    public void testId() throws Exception  {
      MapEvent e = new TestMapEvent(new Object());
      assertEquals(MapEvent.CHANGE, e.getId());
     
      e.setId(MapEvent.ADD);
      assertEquals(MapEvent.ADD, e.getId());
    }
View Full Code Here

/**
*/
public class DataNodeEventTest extends TestCase {

    public void testNewName() throws Exception {
        MapEvent event = new DataNodeEvent(new Object(), new DataNodeDescriptor("someName"));
        assertEquals("someName", event.getNewName());
    }
View Full Code Here

        MapEvent event = new DataNodeEvent(new Object(), new DataNodeDescriptor("someName"));
        assertEquals("someName", event.getNewName());
    }

    public void testNoNameChange() throws Exception {
        MapEvent event = new DataNodeEvent(new Object(), new DataNodeDescriptor("someName"));
        assertFalse(event.isNameChange());
       
        event.setOldName("someOldName");
        assertTrue(event.isNameChange());
    }
View Full Code Here

        event.setOldName("someOldName");
        assertTrue(event.isNameChange());
    }

    public void testNameChange() throws Exception {
        MapEvent event = new DataNodeEvent(
                new Object(),
                new DataNodeDescriptor("someName"),
                "someOldName");
        assertEquals("someName", event.getNewName());
        assertTrue(event.isNameChange());
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.map.event.MapEvent

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.