Ignore:
Timestamp:
11/16/12 13:51:11 (12 years ago)
Author:
pharms
Message:
  • added support for storing timestamps with events
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-events-test/src/test/java/de/ugoe/cs/autoquest/eventcore/EventTest.java

    r958 r996  
    313313    } 
    314314 
     315    @Test 
     316    public void testSetParameter_1() throws Exception { 
     317        Event fixture = new Event(mock(IEventType.class)); 
     318        assertNull(fixture.getParameter("key")); 
     319    } 
     320 
     321    @Test 
     322    public void testSetParameter_2() throws Exception { 
     323        Event fixture = new Event(mock(IEventType.class)); 
     324        fixture.setParameter("key", "value"); 
     325        assertEquals("value", fixture.getParameter("key")); 
     326    } 
     327 
     328    @Test 
     329    public void testSetParameter_3() throws Exception { 
     330        Event fixture = new Event(mock(IEventType.class)); 
     331        fixture.setParameter("key", "value"); 
     332        fixture.setParameter("key", null); 
     333        assertNull(fixture.getParameter("key")); 
     334    } 
     335 
     336    @Test 
     337    public void testSetParameter_4() throws Exception { 
     338        Event fixture = new Event(mock(IEventType.class)); 
     339        fixture.setParameter("key", "value"); 
     340        assertNull(fixture.getParameter("key2")); 
     341    } 
     342 
     343    @Test(expected = java.lang.IllegalArgumentException.class) 
     344    public void testSetParameter_5() throws Exception { 
     345        Event fixture = new Event(mock(IEventType.class)); 
     346        fixture.setParameter(null, null); 
     347    } 
     348 
     349    @Test(expected = java.lang.IllegalArgumentException.class) 
     350    public void testGetParameter_1() throws Exception { 
     351        Event fixture = new Event(mock(IEventType.class)); 
     352        fixture.getParameter(null); 
     353    } 
     354 
     355    @Test 
     356    public void testGetTimestamp_1() throws Exception { 
     357        Event fixture = new Event(mock(IEventType.class)); 
     358        assertTrue(fixture.getTimestamp() < 0); 
     359    } 
     360 
     361    @Test 
     362    public void testSetTimestamp_1() throws Exception { 
     363        Event fixture = new Event(mock(IEventType.class)); 
     364        fixture.setTimestamp(1234); 
     365        assertEquals(1234, fixture.getTimestamp()); 
     366    } 
     367 
    315368    public static void main(String[] args) { 
    316369        new org.junit.runner.JUnitCore().run(EventTest.class); 
Note: See TracChangeset for help on using the changeset viewer.