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


org.mandarax.kernel.validation.TestCase

All known Subclasses:   org.mandarax.reference.validation.TestCaseImpl,
TestCase
public interface TestCase extends PropertiesSupport(Code)
Test case that can be used to validate a knowledge base. Modelled after JUnit test cases, although this interface does not depend on JUnit. A reference implementation based on JUnit is provided as well.

The test case can validate the following:

  1. whether a ground query yields true or false
  2. the expected variable replacements in a query containing variables
  3. the number of expected results

author:
   Jens Dietrich
version:
   3.4 <7 March 05>
since:
   3.4


Field Summary
final public static  intAT_BOTTOM
    
final public static  intON_TOP
    


Method Summary
abstract public  voidexecute()
     Execute the test case.
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()
     Get the test knowledge base.
public  intgetPolicyToAddAssumptionsToKB()
     Get the policy to add an assumption.
public  QuerygetQuery()
     Set the test query.
public  booleanisMustBeTrue()
     Indicates whether a test case must yield true.
public  voidprepare()
     Prepares the test case.
public  voidrelease()
     Releases the test case.
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 test knowledge base.
public  voidsetMustBeTrue(boolean mustBeTrue)
     Sets whether a test case must yield true.
public  voidsetPolicyToAddAssumptionsToKB(int policy)
     Set the policy to add an assumption.
public  voidsetQuery(Query query)
     Set the test query.

Field Detail
AT_BOTTOM
final public static int AT_BOTTOM(Code)



ON_TOP
final public static int ON_TOP(Code)





Method Detail
execute
abstract public void execute() throws Exception(Code)
Execute the test case.



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)
Get the test knowledge base. 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



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



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.



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



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 test knowledge base.
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



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



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