Source Code Cross Referenced for AbstractTestCase.java in  » J2EE » Mdarad » org » mdarad » framework » test » 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 » J2EE » Mdarad » org.mdarad.framework.test 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:            Mdarad-Toolobox is a collection of tools for Architected RAD
003:            (Rapid Application Development) based on an MDA approach.
004:            The toolbox contains frameworks and generators for many environments
005:            (JAVA, J2EE, Hibernate, .NET, C++, etc.) which allow to generate
006:            applications from a design Model
007:        	Copyright (C) 2004-2005  Elapse Technologies Inc.
008:
009:        	This library is free software; you can redistribute it and/or
010:        	modify it under the terms of the GNU General Public
011:        	License as published by the Free Software Foundation; either
012:        	version 2.1 of the License, or (at your option) any later version.
013:
014:        	This library is distributed in the hope that it will be useful,
015:        	but WITHOUT ANY WARRANTY; without even the implied warranty of
016:        	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
017:        	General Public License for more details.
018:
019:        	You should have received a copy of the GNU General Public
020:        	License along with this library; if not, write to the Free Software
021:        	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
022:         */
023:
024:        package org.mdarad.framework.test;
025:
026:        import java.net.URI;
027:        import java.util.Calendar;
028:        import java.util.Currency;
029:        import java.util.Date;
030:        import java.util.HashMap;
031:        import java.util.Locale;
032:        import java.util.Map;
033:        import java.util.TimeZone;
034:
035:        import junit.framework.TestCase;
036:
037:        import org.dataisland.primitives.datatype.Blob;
038:        import org.dataisland.primitives.datatype.Money;
039:        import org.dataisland.primitives.format.DateDataIslandFormat;
040:
041:        public class AbstractTestCase extends TestCase {
042:            //primitives
043:            public static final String DEFAULT_STRING = "s";
044:            public static final char DEFAULT_CHAR = 'c';
045:            public static final boolean DEFAULT_BOOLEAN = false;
046:            public static final short DEFAULT_SHORT = 12;
047:            public static final int DEFAULT_INT = 23;
048:            public static final float DEFAULT_FLOAT = 34.0f;
049:            public static final double DEFAULT_DOUBLE = 45.0;
050:            public static final long DEFAULT_LONG = 56;
051:
052:            //wrappers
053:            public static final Integer DEFAULT_INT_OBJECT = new Integer(
054:                    DEFAULT_INT);
055:            public static final Long DEFAULT_LONG_OBJECT = new Long(
056:                    DEFAULT_LONG);
057:            public static final Short DEFAULT_SHORT_OBJECT = new Short(
058:                    DEFAULT_SHORT);
059:            public static final Float DEFAULT_FLOAT_OBJECT = new Float(
060:                    DEFAULT_FLOAT);
061:            public static final Double DEFAULT_DOUBLE_OBJECT = new Double(
062:                    DEFAULT_DOUBLE);
063:            public static final Boolean DEFAULT_BOOLEAN_OBJECT = new Boolean(
064:                    DEFAULT_BOOLEAN);
065:            public static final Character DEFAULT_CHAR_OBJECT = new Character(
066:                    DEFAULT_CHAR);
067:
068:            //common
069:            public static final Date DEFAULT_DATE;
070:            public static final TimeZone DEFAULT_TIMEZONE = TimeZone
071:                    .getDefault();
072:            public static final Locale DEFAULT_LOCALE = Locale.ENGLISH;
073:            public static final Currency DEFAULT_CURRENCY = Currency
074:                    .getInstance("CAD");
075:
076:            //dataisland
077:            public static final Blob DEFAULT_BLOB;
078:            public static final String DEFAULT_HYPERTEXT = "<b><strong>Mdarad</strong></b>";
079:            public static final Money DEFAULT_MONEY;
080:            public static final String DEFAULT_TEXT = "Mdarad-Toolbox stands for 'Model Driven Architected Rapid Application Development' Toolbox. It is a combination of MDA and ARAD. In other words, it is a collection of tools used to generate end to end applications from a simple modeling diagram (UML and such).";
081:            public static final URI DEFAULT_URI = URI
082:                    .create("http://www.mdarad.org");;
083:
084:            public static final float DELTA_FLOAT = 0.00001f;
085:            public static final double DELAT_DOUBLE = 0.00001;
086:
087:            static {
088:                Calendar calendar = Calendar.getInstance(TimeZone.getDefault());
089:                calendar.setTimeInMillis(0);
090:                calendar.set(Calendar.YEAR, 1978);
091:                calendar.set(Calendar.MONTH, 4);
092:                calendar.set(Calendar.DAY_OF_MONTH, 4);
093:                calendar.set(Calendar.HOUR_OF_DAY, 0);
094:                DEFAULT_DATE = calendar.getTime();
095:
096:                DEFAULT_BLOB = new Blob();
097:                DEFAULT_BLOB.setFileName("test.jpg");
098:                DEFAULT_BLOB.setContent("test".getBytes());
099:                DEFAULT_BLOB.setContentType("image");
100:
101:                DEFAULT_MONEY = new Money();
102:                DEFAULT_MONEY.setAmount(new Double(1000.0d));
103:                DEFAULT_MONEY.setCurrency(DEFAULT_CURRENCY);
104:            }
105:
106:            protected void setUp() throws Exception {
107:                super .setUp();
108:            }
109:
110:            protected void tearDown() throws Exception {
111:                super .tearDown();
112:            }
113:
114:            public static void assertEquals(float expected, float actual) {
115:                assertEquals(expected, actual, DELTA_FLOAT);
116:            }
117:
118:            public static void assertEquals(double expected, double actual) {
119:                assertEquals(expected, actual, DELAT_DOUBLE);
120:            }
121:
122:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.