Package org.jtalks.common.model.entity

Examples of org.jtalks.common.model.entity.Property


   
    @Test
    public void testGet() {
        session.save(property);

        Property result = propertyDao.get(property.getId());

        assertNotNull(result, "Property not found");
        assertEquals(result.getId(), property.getId(), "Property not found");
    }
View Full Code Here


    /*===== Specific methods =====*/
    @Test
    public void testGetByName() {
        session.save(property);

        Property result = propertyDao.getByName(PROPERTY_NAME);
       
        assertNotNull(result, "Property is not found by name.");
        assertEquals(result.getId(), property.getId(), "Property not found");
    }
View Full Code Here

        assertEquals(actualFrom.getAddress(), FROM);
    }
   
   
    private void disableEmailNotifications() {
        Property disabledProperty = new Property(PROPERTY_NAME, FALSE_STRING);
        when(propertyDao.getByName(PROPERTY_NAME)).thenReturn(disabledProperty);
    }
View Full Code Here

        Property disabledProperty = new Property(PROPERTY_NAME, FALSE_STRING);
        when(propertyDao.getByName(PROPERTY_NAME)).thenReturn(disabledProperty);
    }
   
    private void enableEmailNotifications() {
        Property enabledProperty = new Property(PROPERTY_NAME, TRUE_STRING);
        when(propertyDao.getByName(PROPERTY_NAME)).thenReturn(enabledProperty);
    }
View Full Code Here

        event = new HttpSessionEvent(session);
    }

    @Test
    public void testSessionTimeoutSet() throws Exception {
        Property oneHourTimeout = new Property(PROPERTY_NAME, String.valueOf(1));
        when(propertyDao.getByName(PROPERTY_NAME)).thenReturn(oneHourTimeout);
       
        listener.sessionCreated(event);

        int expireTime = (int) TimeUnit.SECONDS.convert(sessionTimeoutProperty.intValue(), TimeUnit.MINUTES);
View Full Code Here

        assertEquals(session.getMaxInactiveInterval(), expireTime);
    }

    @Test
    public void testSessionZeroTimeoutConversion() throws Exception {
        Property oneHourTimeout = new Property(PROPERTY_NAME, String.valueOf(0));
        when(propertyDao.getByName(PROPERTY_NAME)).thenReturn(oneHourTimeout);
       
        listener.sessionCreated(event);

        assertEquals(session.getMaxInactiveInterval(), -1);
View Full Code Here

TOP

Related Classes of org.jtalks.common.model.entity.Property

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.