Package com.memetix.mst.language

Examples of com.memetix.mst.language.SpokenDialect


        Speak.setKey(null);
        Speak.setClientId(null);
        exception.expect(RuntimeException.class);
        exception.expectMessage("Must provide a Windows Azure Marketplace Client Id and Client Secret - Please see http://msdn.microsoft.com/en-us/library/hh454950.aspx for further documentation");
        String text = "Hello World!";
        SpokenDialect language = SpokenDialect.ENGLISH_INDIA;
        Speak.execute(text, language);
    }
View Full Code Here


     * Test of execute method, of class Speak.
     */
    @Test
    public void testGetSpeakUrl() throws Exception {
        String text = "Hello World!";
        SpokenDialect language = SpokenDialect.ENGLISH_INDIA;
        String expResult = "http://api.microsofttranslator.com/V2/http.svc/Speak";
        String result = Speak.execute(text, language);
        assertEquals(true, result.contains(expResult));
    }
View Full Code Here

   
    @Test
    public void testGetSpeakUrl_NoAppId() throws Exception {
        SpokenDialect.setKey(null);
        String text = "Hello World!";
        SpokenDialect language = SpokenDialect.ENGLISH_INDIA;
        String expResult = "http://api.microsofttranslator.com/V2/http.svc/Speak";
        String result = Speak.execute(text, language);
        assertEquals(true, result.contains(expResult));
    }
View Full Code Here

     * Test of execute method, of class Speak.
     */
    @Test
    public void testGetSpeakUrlUk() throws Exception {
        String text = "Hello World!";
        SpokenDialect language = SpokenDialect.ENGLISH_UNITED_KINGDOM;
        String expResult = "http://api.microsofttranslator.com/V2/http.svc/Speak";
        String result = Speak.execute(text, language);
        assertEquals(true, result.contains(expResult));
    }
View Full Code Here

     * Test of valueOf method, of class Language.
     */
    @Test
    public void testValueOf() {
        String name = "ENGLISH_UNITED_STATES";
        SpokenDialect expResult = SpokenDialect.ENGLISH_UNITED_STATES;
        SpokenDialect result = SpokenDialect.valueOf(name);
        assertEquals(expResult, result);

    }
View Full Code Here

     * Test of fromString method, of class Language.
     */
    @Test
    public void testFromString() {
        String pLanguage = "en-us";
        SpokenDialect expResult = SpokenDialect.ENGLISH_UNITED_STATES;
        SpokenDialect result = SpokenDialect.fromString(pLanguage);
        assertEquals(expResult, result);
    }
View Full Code Here

    /**
     * Test of toString method, of class Language.
     */
    @Test
    public void testToString() {
        SpokenDialect instance = SpokenDialect.ENGLISH_UNITED_STATES;
        String expResult = "en-us";
        String result = instance.toString();
        assertEquals(expResult, result);
    }
View Full Code Here

TOP

Related Classes of com.memetix.mst.language.SpokenDialect

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.