Java Doc for TestCaseImpl.java in  » Rule-Engine » Mandarax » org » mandarax » reference » validation » 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 » Rule Engine » Mandarax » org.mandarax.reference.validation 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.mandarax.reference.validation.TestCaseImpl

TestCaseImpl
public class TestCaseImpl extends junit.framework.TestCase implements TestCase(Code)
Default implementation of a test case, based on the JUnit framework.
author:
   Jens Dietrich
version:
   3.4 <7 March 05>
since:
   3.3.3


Field Summary
protected  ClauseSet[]assumptions
    
protected  intexpectedNumberOfResults
    
protected  java.util.Map[]expectedReplacements
    
protected  InferenceEngineie
    
protected  KnowledgeBasekb
    
protected  Queryquery
    

Constructor Summary
public  TestCaseImpl(ClauseSet[] assumptions, int policyToAddAssumptionsToKB, Query query, int expectedNumberOfResults, java.util.Map[] expectedReplacements, boolean mustBeTrue)
     Constructor.
public  TestCaseImpl(ClauseSet[] assumptions, int policyToAddAssumptionsToKB, Query query, int expectedNumberOfResults)
     Constructor.
public  TestCaseImpl(ClauseSet[] assumptions, int policyToAddAssumptionsToKB, Query query, java.util.Map[] expectedReplacements)
     Constructor.
public  TestCaseImpl(ClauseSet[] assumptions, int policyToAddAssumptionsToKB, Query query, boolean mustBeTrue)
     Constructor.

Method Summary
public  booleanequals(Object obj)
     Compares objects.
public  voidexecute()
     Tests the knowledge base.
public  ClauseSet[]getAssumptions()
     Get the assumptions.
public  intgetExpectedNumberOfResults()
    
public  java.util.Map[]getExpectedReplacements()
     Get an array of maps containing variable term -> constant term mapping expected in the result at this position.
public  KnowledgeBasegetKb()
    
public  intgetPolicyToAddAssumptionsToKB()
     Get the policy to add an assumption.
public  PropertiesgetProperties()
     Get the properties as one "properties" instance.
public  StringgetProperty(String key)
     Get a property.
Parameters:
  key - the property key the respective value.
public  QuerygetQuery()
     Get the test query.
public  inthashCode()
    
public  booleanisMustBeTrue()
     Indicates whether a test case must yield true.
public  voidprepare()
     Prepares the test case.
public  EnumerationpropertyNames()
     Returns an enumeration of all the keys in this property list, including distinct keys in the default property list if a key of the same name has not already been found from the main properties list.
public  voidrelease()
     Releases the test case.
public  ObjectremoveProperty(String key)
     Remove a property.
public  voidsetAssumptions(ClauseSet[] assumptions)
     Set the assumptions.
public  voidsetExpectedNumberOfResults(int expectedNumberOfResults)
    
public  voidsetExpectedReplacements(java.util.Map[] expectedReplacements)
     Set an array of maps containing variable term -> constant term mapping expected in the result at this position.
public  voidsetKb(KnowledgeBase kb)
     Set the kb.
public  voidsetMustBeTrue(boolean mustBeTrue)
     Sets whether a test case must yield true.
public  voidsetPolicyToAddAssumptionsToKB(int policy)
     Set the policy to add an assumption.
public  voidsetProperties(Properties properties)
     Set the properties.
public  ObjectsetProperty(String key, String value)
     Set a property.
public  voidsetQuery(Query query)
     Set the test query.
protected  voidsetUp()
     Sets up down the test case.
protected  voidtearDown()
     Tears down the test case.

Field Detail
assumptions
protected ClauseSet[] assumptions(Code)



expectedNumberOfResults
protected int expectedNumberOfResults(Code)



expectedReplacements
protected java.util.Map[] expectedReplacements(Code)



ie
protected InferenceEngine ie(Code)



kb
protected KnowledgeBase kb(Code)



query
protected Query query(Code)




Constructor Detail
TestCaseImpl
public TestCaseImpl(ClauseSet[] assumptions, int policyToAddAssumptionsToKB, Query query, int expectedNumberOfResults, java.util.Map[] expectedReplacements, boolean mustBeTrue)(Code)
Constructor.
Parameters:
  assumptions -
Parameters:
  policyToAddAssumptionsToKB -
Parameters:
  query -
Parameters:
  expectedNumberOfResults -
Parameters:
  expectedReplacements -
Parameters:
  mustBeTrue -



TestCaseImpl
public TestCaseImpl(ClauseSet[] assumptions, int policyToAddAssumptionsToKB, Query query, int expectedNumberOfResults)(Code)
Constructor.
Parameters:
  assumptions -
Parameters:
  policyToAddAssumptionsToKB -
Parameters:
  query -
Parameters:
  expectedNumberOfResults -



TestCaseImpl
public TestCaseImpl(ClauseSet[] assumptions, int policyToAddAssumptionsToKB, Query query, java.util.Map[] expectedReplacements)(Code)
Constructor.
Parameters:
  assumptions -
Parameters:
  policyToAddAssumptionsToKB -
Parameters:
  query -
Parameters:
  expectedReplacements -



TestCaseImpl
public TestCaseImpl(ClauseSet[] assumptions, int policyToAddAssumptionsToKB, Query query, boolean mustBeTrue)(Code)
Constructor.
Parameters:
  assumptions -
Parameters:
  policyToAddAssumptionsToKB -
Parameters:
  query -
Parameters:
  expectedNumberOfResults -
Parameters:
  expectedReplacements -
Parameters:
  mustBeTrue -




Method Detail
equals
public boolean equals(Object obj)(Code)
Compares objects.
Parameters:
  obj - an object a boolean



execute
public void execute() throws Exception(Code)
Tests the knowledge base.



getAssumptions
public ClauseSet[] getAssumptions()(Code)
Get the assumptions. Returns the assumptions.



getExpectedNumberOfResults
public int getExpectedNumberOfResults()(Code)
Returns the expectedNumberOfResults.



getExpectedReplacements
public java.util.Map[] getExpectedReplacements()(Code)
Get an array of maps containing variable term -> constant term mapping expected in the result at this position. Can be null indicating that this condition will not be checked in this test case. Returns the expectedReplacements.



getKb
public KnowledgeBase getKb()(Code)
Returns the kb.



getPolicyToAddAssumptionsToKB
public int getPolicyToAddAssumptionsToKB()(Code)
Get the policy to add an assumption. an integer, the (encoded) policy = one of the constants defined in TestCase



getProperties
public Properties getProperties()(Code)
Get the properties as one "properties" instance. a properties instance



getProperty
public String getProperty(String key)(Code)
Get a property.
Parameters:
  key - the property key the respective value. The method returns null if the property is not found.



getQuery
public Query getQuery()(Code)
Get the test query. Returns the query.



hashCode
public int hashCode()(Code)
Get the hash code for this object an integer



isMustBeTrue
public boolean isMustBeTrue()(Code)
Indicates whether a test case must yield true. Only used if the query is ground (does not have variables). Returns the mustBeTrue.



prepare
public void prepare() throws Exception(Code)
Prepares the test case.



propertyNames
public Enumeration propertyNames()(Code)
Returns an enumeration of all the keys in this property list, including distinct keys in the default property list if a key of the same name has not already been found from the main properties list. an enumeration of all the keys in this property list, including the keys in the default property list



release
public void release() throws Exception(Code)
Releases the test case.



removeProperty
public Object removeProperty(String key)(Code)
Remove a property.
Parameters:
  key - the property key the value to which the key had been mapped, or null if the key did not have a mapping.



setAssumptions
public void setAssumptions(ClauseSet[] assumptions)(Code)
Set the assumptions.
Parameters:
  assumptions - The assumptions to set.



setExpectedNumberOfResults
public void setExpectedNumberOfResults(int expectedNumberOfResults)(Code)

Parameters:
  expectedNumberOfResults - The expectedNumberOfResults to set.



setExpectedReplacements
public void setExpectedReplacements(java.util.Map[] expectedReplacements)(Code)
Set an array of maps containing variable term -> constant term mapping expected in the result at this position. Can be null indicating that this condition will not be checked in this test case.
Parameters:
  expectedReplacements - The expectedReplacements to set.



setKb
public void setKb(KnowledgeBase kb)(Code)
Set the kb. Called by the kb when adding the test case to the kb to insert a back reference.
Parameters:
  kb - The kb to set.



setMustBeTrue
public void setMustBeTrue(boolean mustBeTrue)(Code)
Sets whether a test case must yield true. Only used if the query is ground (does not have variables).
Parameters:
  mustBeTrue - The mustBeTrue to set.



setPolicyToAddAssumptionsToKB
public void setPolicyToAddAssumptionsToKB(int policy)(Code)
Set the policy to add an assumption.
Parameters:
  policy - the (encoded) policy = one of the constants defined in TestCase



setProperties
public void setProperties(Properties properties)(Code)
Set the properties. Not required by the interface, but useful for bean (introspection-) based tools.
Parameters:
  properties - the properties



setProperty
public Object setProperty(String key, String value)(Code)
Set a property.
Parameters:
  key - the key
Parameters:
  value - the value the previous value of the specified key in this property list, or null if it did not have one.



setQuery
public void setQuery(Query query)(Code)
Set the test query.
Parameters:
  query - The query to set.



setUp
protected void setUp() throws Exception(Code)
Sets up down the test case.



tearDown
protected void tearDown() throws Exception(Code)
Tears down the test case.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.