Package com.totalchange.jizz.messenger

Examples of com.totalchange.jizz.messenger.JizzEmailResponse


        mockDj.setLocale("en");
        mockDj.setName("Test");
        mockDj.setEmail("test@test.com");
        mockDj.setEmailConfirmation("123456");

        JizzEmailResponse mockEmailResponse = new JizzEmailResponse() {
            @Override
            public String getSubject() {
                return "Test Confirmation";
            }
View Full Code Here


        mockDj.setName("DJ Teste");
        mockDj.setEmail("test@test.com");
        mockDj.setEmailConfirmation("123456");

        for (Locale locale : Locale.getAvailableLocales()) {
            JizzEmailResponse response = renderer.generateConfirmAddressEmail(
                    locale, mockStation, mockDj,
                    "http://test.jizz.com/jizz/confirm?key=123456");

            if (logger.isTraceEnabled()) {
                logger.trace("Response for locale " + locale + ": [Subject: "
                        + response.getSubject() + "], [HTML: "
                        + response.getHtml() + "], [Plain Text: "
                        + response.getPlainText() + "]");
            }

            assertTrue("Has a subject", response.getSubject().length() > 0);
            assertTrue("Has a HTML response", response.getHtml().length() > 0);
            assertTrue("Has a Plain Text response", response.getPlainText()
                    .length() > 0);
        }
    }
View Full Code Here

        mockDj.setStation(mockStation);
        mockDj.setName("DJ Teste");
        mockDj.setEmail("test@test.com");

        for (Locale locale : Locale.getAvailableLocales()) {
            JizzEmailResponse response = renderer.generateInviteEmail(locale,
                    mockStation, mockDj, "newbie@test.com");

            if (logger.isTraceEnabled()) {
                logger.trace("Response for locale " + locale + ": [Subject: "
                        + response.getSubject() + "], [HTML: "
                        + response.getHtml() + "], [Plain Text: "
                        + response.getPlainText() + "]");
            }

            assertTrue("Has a subject", response.getSubject().length() > 0);
            assertTrue("Has a HTML response", response.getHtml().length() > 0);
            assertTrue("Has a Plain Text response", response.getPlainText()
                    .length() > 0);
        }
    }
View Full Code Here

        mockSong.setDj(mockDj);
        mockSong.setArtist("Spittle Donkey");
        mockSong.setTitle("Do the Monk Phat");

        for (Locale locale : Locale.getAvailableLocales()) {
            JizzEmailResponse response = renderer
                    .generateUnsupportedSongTypeEmail(locale, mockStation,
                            mockDj, mockSong);

            if (logger.isTraceEnabled()) {
                logger.trace("Response for locale " + locale + ": [Subject: "
                        + response.getSubject() + "], [HTML: "
                        + response.getHtml() + "], [Plain Text: "
                        + response.getPlainText() + "]");
            }

            assertTrue("Has a subject", response.getSubject().length() > 0);
            assertTrue("Has a HTML response", response.getHtml().length() > 0);
            assertTrue("Has a Plain Text response", response.getPlainText()
                    .length() > 0);
        }
    }
View Full Code Here

        JizzBroadcast mockBroadcast = new JizzBroadcast();
        mockBroadcast.setStation(mockStation);
        mockBroadcast.setEstimatedStart(new Date());

        for (Locale locale : Locale.getAvailableLocales()) {
            JizzEmailResponse response = renderer.generateNewBroadcastEmail(
                    locale, mockStation, mockDj, mockBroadcast);

            if (logger.isTraceEnabled()) {
                logger.trace("Response for locale " + locale + ": [Subject: "
                        + response.getSubject() + "], [HTML: "
                        + response.getHtml() + "], [Plain Text: "
                        + response.getPlainText() + "]");
            }

            assertTrue("Has a subject", response.getSubject().length() > 0);
            assertTrue("Has a HTML response", response.getHtml().length() > 0);
            assertTrue("Has a Plain Text response", response.getPlainText()
                    .length() > 0);
        }
    }
View Full Code Here

        JizzBroadcast mockBroadcast = new JizzBroadcast();
        mockBroadcast.setStation(mockStation);
        mockBroadcast.setEstimatedStart(new Date());

        for (Locale locale : Locale.getAvailableLocales()) {
            JizzEmailResponse response = renderer.generateSongReminderEmail(
                    locale, mockStation, mockDj, mockBroadcast);

            if (logger.isTraceEnabled()) {
                logger.trace("Response for locale " + locale + ": [Subject: "
                        + response.getSubject() + "], [HTML: "
                        + response.getHtml() + "], [Plain Text: "
                        + response.getPlainText() + "]");
            }

            assertTrue("Has a subject", response.getSubject().length() > 0);
            assertTrue("Has a HTML response", response.getHtml().length() > 0);
            assertTrue("Has a Plain Text response", response.getPlainText()
                    .length() > 0);
        }
    }
View Full Code Here

                if (true) {
                    throw new RuntimeException("Forced exception",
                            new RuntimeException("A cause"));
                }
            } catch (Throwable mockThrowable) {
                JizzEmailResponse response = renderer.generateErrorEmail(
                        locale, mockStation, mockDj, "Test error",
                        mockThrowable);

                if (logger.isTraceEnabled()) {
                    logger.trace("Response for locale " + locale
                            + ": [Subject: " + response.getSubject()
                            + "], [HTML: " + response.getHtml()
                            + "], [Plain Text: " + response.getPlainText()
                            + "]");
                }

                assertTrue("Has a subject", response.getSubject().length() > 0);
                assertTrue("Has a HTML response",
                        response.getHtml().length() > 0);
                assertTrue("Has a Plain Text response", response.getPlainText()
                        .length() > 0);
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.totalchange.jizz.messenger.JizzEmailResponse

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.