Package com.microsoft.windowsazure.services.servicebus.implementation

Examples of com.microsoft.windowsazure.services.servicebus.implementation.BrokerPropertiesMapper.fromString()


    public void jsonStringMapsToBrokerPropertiesObject() {
        // Arrange
        BrokerPropertiesMapper mapper = new BrokerPropertiesMapper();

        // Act
        BrokerProperties properties = mapper
                .fromString("{\"DeliveryCount\":5,\"MessageId\":\"something\"}");

        // Assert
        assertNotNull(properties);
        assertEquals(new Integer(5), properties.getDeliveryCount());
View Full Code Here


    public void deserializingAllPossibleValues() {
        // Arrange
        BrokerPropertiesMapper mapper = new BrokerPropertiesMapper();

        // Act
        BrokerProperties properties = mapper
                .fromString(testBrokerPropertiesString);

        // Assert
        assertNotNull(properties);
View Full Code Here

    public void missingDatesDeserializeAsNull() {
        // Arrange
        BrokerPropertiesMapper mapper = new BrokerPropertiesMapper();

        // Act
        BrokerProperties properties = mapper.fromString("{}");

        // Assert
        assertNull(properties.getLockedUntilUtc());
        assertNull(properties.getScheduledEnqueueTimeUtc());
    }
View Full Code Here

        BrokerPropertiesMapper mapper = new BrokerPropertiesMapper();
        Locale defaultLocale = Locale.getDefault();
        Locale.setDefault(Locale.KOREA);

        // Act
        BrokerProperties brokerProperties = mapper
                .fromString(testBrokerPropertiesString);
        Locale.setDefault(defaultLocale);

        // Assert
        long lockedUntilDelta = brokerProperties.getLockedUntilUtc().getTime()
View Full Code Here

        BrokerPropertiesMapper mapper = new BrokerPropertiesMapper();
        Locale defaultLocale = Locale.getDefault();
        Locale.setDefault(Locale.US);

        // Act
        BrokerProperties brokerProperties = mapper
                .fromString(testBrokerPropertiesString);
        Locale.setDefault(defaultLocale);

        // Assert
        long lockedUntilDelta = brokerProperties.getLockedUntilUtc().getTime()
View Full Code Here

        BrokerPropertiesMapper mapper = new BrokerPropertiesMapper();
        Locale defaultLocale = Locale.getDefault();
        Locale.setDefault(Locale.CHINA);

        // Act
        BrokerProperties brokerProperties = mapper
                .fromString(testBrokerPropertiesString);
        Locale.setDefault(defaultLocale);

        // Assert
        long lockedUntilDelta = brokerProperties.getLockedUntilUtc().getTime()
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.