Source Code Cross Referenced for TranslateTest.java in  » Portal » liferay-portal-4.4.2 » com » liferay » portalweb » portlet » translator » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Portal » liferay portal 4.4.2 » com.liferay.portalweb.portlet.translator 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003:         *
004:         * Permission is hereby granted, free of charge, to any person obtaining a copy
005:         * of this software and associated documentation files (the "Software"), to deal
006:         * in the Software without restriction, including without limitation the rights
007:         * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008:         * copies of the Software, and to permit persons to whom the Software is
009:         * furnished to do so, subject to the following conditions:
010:         *
011:         * The above copyright notice and this permission notice shall be included in
012:         * all copies or substantial portions of the Software.
013:         *
014:         * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015:         * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016:         * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017:         * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018:         * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019:         * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020:         * SOFTWARE.
021:         */package com.liferay.portalweb.portlet.translator;
022:
023:        import com.liferay.portalweb.portal.BaseTestCase;
024:
025:        /**
026:         * <a href="TranslateTest.java.html"><b><i>View Source</i></b></a>
027:         *
028:         * @author Brian Wing Shun Chan
029:         *
030:         */
031:        public class TranslateTest extends BaseTestCase {
032:            public void testTranslate() throws Exception {
033:                selenium.select("_26_id", "label=English to Chinese (China)");
034:                selenium
035:                        .type(
036:                                "_26_text",
037:                                "My name is Liferay Translator, fluent in over 6 million forms of communication.");
038:                selenium.click("//input[@value='Translate']");
039:                selenium.waitForPageToLoad("30000");
040:                verifyTrue(selenium
041:                        .isTextPresent("\u6211\u7684\u540d\u5b57\u662fLiferay \u8bd1\u8005, \u6d41\u5229\u5b8c\u5168\u6210\u529f6 \u901a\u4fe1\u7684\u767e\u4e07\u4e2a\u5f62\u5f0f\u3002 "));
042:                selenium.select("_26_id", "label=English to Chinese (Taiwan)");
043:                selenium.click("//input[@value='Translate']");
044:                selenium.waitForPageToLoad("30000");
045:                verifyTrue(selenium
046:                        .isTextPresent("\u6211\u7684\u540d\u5b57\u662fLiferay \u8b6f\u8005, \u6d41\u5229\u5b8c\u5168\u6210\u529f6 \u901a\u4fe1\u7684\u767e\u842c\u500b\u5f62\u5f0f\u3002 "));
047:                selenium.select("_26_id", "label=English to Dutch");
048:                selenium.click("//input[@value='Translate']");
049:                selenium.waitForPageToLoad("30000");
050:                verifyTrue(selenium
051:                        .isTextPresent("Mijn naam is Vertaler Liferay, vloeiend in meer dan 6 miljoen vormen van mededeling. "));
052:                selenium.select("_26_id", "label=English to French");
053:                selenium.click("//input[@value='Translate']");
054:                selenium.waitForPageToLoad("30000");
055:                verifyTrue(selenium
056:                        .isTextPresent("Mon nom est traducteur de Liferay, fluent dans plus de 6 millions de formes de communication. "));
057:                selenium.select("_26_id", "label=English to German");
058:                selenium.click("//input[@value='Translate']");
059:                selenium.waitForPageToLoad("30000");
060:                verifyTrue(selenium
061:                        .isTextPresent("Mein Name ist der Liferay \u00dcbersetzer, der innen \u00fcber 6 Million Formen Kommunikation flie\u00dfend ist. "));
062:                selenium.select("_26_id", "label=English to Italian");
063:                selenium.click("//input[@value='Translate']");
064:                selenium.waitForPageToLoad("30000");
065:                verifyTrue(selenium
066:                        .isTextPresent("Il mio nome \u00e8 traduttore di Liferay, fluente dentro oltre 6 milione forme della comunicazione. "));
067:                selenium.select("_26_id", "label=English to Japanese");
068:                selenium
069:                        .type("_26_text",
070:                                "My name is JR Skywalker, fluent in over 6 million forms of communication.");
071:                verifyTrue(selenium
072:                        .isTextPresent("\u79c1\u306e\u540d\u524d\u306f\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u306e6,000,000 \u306e\u5f62\u614b\u306b\u6d41\u66a2\u306aJR Skywalker \u3067\u3042\u308b\u3002 "));
073:                selenium.select("_26_id", "label=English to Korean");
074:                selenium
075:                        .type(
076:                                "_26_text",
077:                                "My name is Liferay Translator, fluent in over 6 million forms of communication.");
078:                selenium.click("//input[@value='Translate']");
079:                selenium.waitForPageToLoad("30000");
080:                verifyTrue(selenium
081:                        .isTextPresent("\ub098\uc758 \uc774\ub984\uc740 \ucee4\ubba4\ub2c8\ucf00\uc774\uc158\uc758 6\ubc31\ub9cc\uac1c\uc758 \ubaa8\uc591\uc5d0 \uc548\uc73c\ub85c \uc720\ucc3d\ud55cLiferay\ud1b5\uc5ed \uc774\ub2e4. "));
082:                selenium.select("_26_id", "label=English to Portuguese");
083:                selenium.click("//input[@value='Translate']");
084:                selenium.waitForPageToLoad("30000");
085:                verifyTrue(selenium
086:                        .isTextPresent("Meu nome \u00e9 tradutor de Liferay, fluent dentro sobre 6 milh\u00e3o formul\u00e1rios de uma comunica\u00e7\u00e3o. "));
087:                selenium.select("_26_id", "label=English to Spanish");
088:                selenium.click("//input[@value='Translate']");
089:                selenium.waitForPageToLoad("30000");
090:                verifyTrue(selenium
091:                        .isTextPresent("Mi nombre es traductor de Liferay, fluido adentro sobre 6 millones de formas de comunicaci\u00f3n. "));
092:                selenium.select("_26_id", "label=Chinese (China) to English");
093:                selenium
094:                        .type(
095:                                "_26_text",
096:                                "\u6211\u7684\u540d\u5b57\u662fMike Vader \u8bd1\u8005, \u6d41\u5229\u5b8c\u5168\u6210\u529f6 \u901a\u4fe1\u7684\u767e\u4e07\u4e2a\u5f62\u5f0f\u3002 ");
097:                selenium.click("//input[@value='Translate']");
098:                selenium.waitForPageToLoad("30000");
099:                verifyTrue(selenium
100:                        .isTextPresent("My name is Mike the Vader translator, fluent completely successful 6 correspondences million forms. "));
101:                selenium.select("_26_id", "label=Chinese (Taiwan) to English");
102:                selenium
103:                        .type(
104:                                "_26_text",
105:                                "\u6211\u7684\u540d\u5b57\u662fLiferay \u8b6f\u8005, \u6d41\u5229\u5b8c\u5168\u6210\u529f6 \u901a\u4fe1\u7684\u767e\u842c\u500b\u5f62\u5f0f\u3002 ");
106:                selenium.click("//input[@value='Translate']");
107:                selenium.waitForPageToLoad("30000");
108:                verifyTrue(selenium
109:                        .isTextPresent("My name is the Liferay translator, fluent completely successful 6 correspondences million forms. "));
110:                selenium.select("_26_id", "label=Dutch to English");
111:                selenium.click("//input[@value='Translate']");
112:                selenium.waitForPageToLoad("30000");
113:                selenium
114:                        .type(
115:                                "_26_text",
116:                                "Mijn naam is Vertaler Liferay, vloeiend in meer dan 6 miljoen vormen van mededeling. ");
117:                verifyTrue(selenium
118:                        .isTextPresent("My name is translator Liferay, fluently in more than 6 millions forms of communication. "));
119:                selenium.select("_26_id", "label=French to English");
120:                selenium
121:                        .type(
122:                                "_26_text",
123:                                "Mon nom est traducteur de Liferay, fluent dans plus de 6 millions de formes de communication. ");
124:                selenium.click("//input[@value='Translate']");
125:                selenium.waitForPageToLoad("30000");
126:                verifyTrue(selenium
127:                        .isTextPresent("My name is a translator of Liferay, flowing in more than 6 million forms of communication. "));
128:                selenium.select("_26_id", "label=French to German");
129:                selenium.click("//input[@value='Translate']");
130:                selenium.waitForPageToLoad("30000");
131:                verifyTrue(selenium
132:                        .isTextPresent("Mein Name ist \u00dcbersetzer von Liferay, flie\u00dfender in mehr als 6 Millionen Kommunikationsformen. "));
133:                selenium.select("_26_id", "label=German to English");
134:                selenium
135:                        .type(
136:                                "_26_text",
137:                                "Mein Name ist \u00dcbersetzer von Liferay, flie\u00dfender in mehr als 6 Millionen Kommunikationsformen. ");
138:                selenium.click("//input[@value='Translate']");
139:                selenium.waitForPageToLoad("30000");
140:                verifyTrue(selenium
141:                        .isTextPresent("My name is a translator more flowing from Liferay, into more than 6 million communication forms. "));
142:                selenium.select("_26_id", "label=German to French");
143:                selenium.click("//input[@value='Translate']");
144:                selenium.waitForPageToLoad("30000");
145:                verifyTrue(selenium
146:                        .isTextPresent("Mon nom est un traducteur coulant des Liferay, sous plus de 6 millions de formes de communication. "));
147:                selenium.select("_26_id", "label=Italian to English");
148:                selenium
149:                        .type(
150:                                "_26_text",
151:                                "Il mio nome \u00e8 traduttore di Liferay, fluente dentro oltre 6 milione forme della comunicazione. ");
152:                selenium.click("//input[@value='Translate']");
153:                selenium.waitForPageToLoad("30000");
154:                verifyTrue(selenium
155:                        .isTextPresent("My name is translator of Liferay, flowing within beyond 6 million shapes the communication. "));
156:                selenium.select("_26_id", "label=Japanese to English");
157:                selenium
158:                        .type(
159:                                "_26_text",
160:                                "\u79c1\u306e\u540d\u524d\u306f\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u306e6,000,000 \u306e\u5f62\u614b\u306b\u6d41\u66a2\u306aLiferay \u306e\u8a33\u8005\u3067\u3042\u308b\u3002 ");
161:                selenium.click("//input[@value='Translate']");
162:                selenium.waitForPageToLoad("30000");
163:                verifyTrue(selenium
164:                        .isTextPresent("My name is the translator of fluent Liferay in form of 6,000,000 of communication. "));
165:                selenium.select("_26_id", "label=Korean to English");
166:                selenium
167:                        .type(
168:                                "_26_text",
169:                                "\ub098\uc758 \uc774\ub984\uc740 \ucee4\ubba4\ub2c8\ucf00\uc774\uc158\uc758 6\ubc31\ub9cc\uac1c\uc758 \ubaa8\uc591\uc5d0 \uc548\uc73c\ub85c \uc720\ucc3d\ud55cLiferay\ud1b5\uc5ed \uc774\ub2e4. ");
170:                selenium.click("//input[@value='Translate']");
171:                selenium.waitForPageToLoad("30000");
172:                verifyTrue(selenium
173:                        .isTextPresent("My name is the Liferay interpretation which in 6000000 shapes of communication is fluent in inside. "));
174:                selenium.select("_26_id", "label=Portuguese to English");
175:                selenium
176:                        .type(
177:                                "_26_text",
178:                                "Meu nome \u00e9 tradutor de Liferay, fluent dentro sobre 6 milh\u00e3o formul\u00e1rios de uma comunica\u00e7\u00e3o. ");
179:                selenium.click("//input[@value='Translate']");
180:                selenium.waitForPageToLoad("30000");
181:                verifyTrue(selenium
182:                        .isTextPresent("My name is translating of Liferay, fluent inside on 6 million forms of a communication."));
183:                selenium.select("_26_id", "label=Spanish to English");
184:                selenium
185:                        .type(
186:                                "_26_text",
187:                                "Mi nombre es traductor de Liferay, fluido adentro sobre 6 millones de formas de comunicaci\u00f3n. ");
188:                selenium.click("//input[@value='Translate']");
189:                selenium.waitForPageToLoad("30000");
190:                verifyTrue(selenium
191:                        .isTextPresent("My name is translator of Liferay, fluid inside on 6 million communication forms."));
192:            }
193:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.