Java Doc for ModifiedSelectorTest.java in  » Build » ANT » org » apache » tools » ant » types » selectors » 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 » Build » ANT » org.apache.tools.ant.types.selectors 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.tools.ant.types.selectors.BaseSelectorTest
   org.apache.tools.ant.types.selectors.ModifiedSelectorTest

ModifiedSelectorTest
public class ModifiedSelectorTest extends BaseSelectorTest (Code)
Unit tests for ModifiedSelector.
since:
   Ant 1.6



Constructor Summary
public  ModifiedSelectorTest(String name)
    

Method Summary
public  void_testCustomCache()
    
public  void_testCustomComparator()
    
public  void_testRuleComparatorViaSelector()
    
public  void_testScenario2()
     This scenario is based on scenario 1, but does not use any default value and its based on selector.
public  voiddoDelayUpdateTest(int kind)
    
public  voiddoScenarioTest(String target, String cachefilename)
    
protected  voiddoTest(Cache cache)
     Test the interface semantic of Caches.
protected  voiddoTest(Algorithm algo)
     Test the interface semantic of Algorithms.
protected  voiddoTest(Comparator comp)
     Test the interface semantic of Comparators.
public  BaseSelectorgetInstance()
     Factory method from base class.
public  voidsetUp()
    
public  voidtestChecksumAlgorithm()
    
public  voidtestChecksumAlgorithmAdler()
    
public  voidtestChecksumAlgorithmCRC()
    
public  voidtestCreatePropertiesCacheDirect()
     Checks whether a cache file is created.
public  voidtestCreatePropertiesCacheViaCustomSelector()
     In earlier implementations there were problems with the order of the s.
public  voidtestCreatePropertiesCacheViaModifiedSelector()
     Checks whether a cache file is created.
public  voidtestCustomAlgorithm()
    
public  voidtestCustomAlgorithm2()
    
public  voidtestCustomClasses()
    
public  voidtestDelayUpdateBuildFinished()
    
public  voidtestDelayUpdateTargetFinished()
    
public  voidtestDelayUpdateTaskFinished()
    
public  voidtestDigestAlgorithmMD5()
    
public  voidtestDigestAlgorithmSHA()
    
public  voidtestEqualComparator()
    
public  voidtestEqualComparatorViaSelector()
    
public  voidtestHashvalueAlgorithm()
    
public  voidtestIllegalCustomAlgorithm()
    
public  voidtestNonExistentCustomAlgorithm()
    
public  voidtestPropcacheInvalid()
     Propertycache must have a set 'cachefile' attribute.
public  voidtestPropertyfileCache()
    
public  voidtestResourceSelectorScenarioSimple()
    
public  voidtestResourceSelectorSelresFalse()
    
public  voidtestResourceSelectorSelresTrue()
    
public  voidtestResourceSelectorSimple()
    
public  voidtestRuleComparator()
    
public  voidtestScenario1()
     Complex test scenario using default values (DigestAlgorithm with MD5, PropertiesfileCache with file=cache.properties, EqualComparator and update=true).
public  voidtestScenarioCoreSelectorDefaults()
    
public  voidtestScenarioCoreSelectorSettings()
    
public  voidtestScenarioCustomSelectorSettings()
    
public  voidtestSeldirs()
     Tests whether the seldirs attribute is used.
public  voidtestValidateWrongAlgorithm()
     Test right use of cache names.
public  voidtestValidateWrongCache()
     Test right use of cache names.
public  voidtestValidateWrongComparator()
     Test right use of comparator names.


Constructor Detail
ModifiedSelectorTest
public ModifiedSelectorTest(String name)(Code)




Method Detail
_testCustomCache
public void _testCustomCache()(Code)



_testCustomComparator
public void _testCustomComparator()(Code)



_testRuleComparatorViaSelector
public void _testRuleComparatorViaSelector()(Code)



_testScenario2
public void _testScenario2()(Code)
This scenario is based on scenario 1, but does not use any default value and its based on selector. Used values are:
  • Cache: Propertyfile, cachefile={java.io.tmpdir}/mycache.txt
  • Algorithm: Digest algorithm=SHA, Provider=null
  • Comparator: java.text.RuleBasedCollator
  • Update: true



doDelayUpdateTest
public void doDelayUpdateTest(int kind)(Code)



doScenarioTest
public void doScenarioTest(String target, String cachefilename)(Code)



doTest
protected void doTest(Cache cache)(Code)
Test the interface semantic of Caches. This method does some common test for cache implementations. A cache must return a stored value and a valid iterator. After calling the delete() the cache must be empty.
Parameters:
  algo - configured test object



doTest
protected void doTest(Algorithm algo)(Code)
Test the interface semantic of Algorithms. This method does some common test for algorithm implementations. An algorithm must return always the same value for the same file and it must not return null.
Parameters:
  algo - configured test object



doTest
protected void doTest(Comparator comp)(Code)
Test the interface semantic of Comparators. This method does some common test for comparator implementations.
Parameters:
  algo - configured test object



getInstance
public BaseSelector getInstance()(Code)
Factory method from base class. This should be overriden in child classes to return a specific Selector class (like here).



setUp
public void setUp()(Code)



testChecksumAlgorithm
public void testChecksumAlgorithm()(Code)



testChecksumAlgorithmAdler
public void testChecksumAlgorithmAdler()(Code)



testChecksumAlgorithmCRC
public void testChecksumAlgorithmCRC()(Code)



testCreatePropertiesCacheDirect
public void testCreatePropertiesCacheDirect()(Code)
Checks whether a cache file is created.



testCreatePropertiesCacheViaCustomSelector
public void testCreatePropertiesCacheViaCustomSelector()(Code)
In earlier implementations there were problems with the order of the s. The scenario was
 
 
 
 
 
It was important first to set the cache and then to set the cache's configuration parameters. That results in the reorganized configure() method of ModifiedSelector. This testcase tests that.



testCreatePropertiesCacheViaModifiedSelector
public void testCreatePropertiesCacheViaModifiedSelector()(Code)
Checks whether a cache file is created.



testCustomAlgorithm
public void testCustomAlgorithm()(Code)



testCustomAlgorithm2
public void testCustomAlgorithm2()(Code)



testCustomClasses
public void testCustomClasses()(Code)



testDelayUpdateBuildFinished
public void testDelayUpdateBuildFinished()(Code)



testDelayUpdateTargetFinished
public void testDelayUpdateTargetFinished()(Code)



testDelayUpdateTaskFinished
public void testDelayUpdateTaskFinished()(Code)



testDigestAlgorithmMD5
public void testDigestAlgorithmMD5()(Code)



testDigestAlgorithmSHA
public void testDigestAlgorithmSHA()(Code)



testEqualComparator
public void testEqualComparator()(Code)



testEqualComparatorViaSelector
public void testEqualComparatorViaSelector()(Code)



testHashvalueAlgorithm
public void testHashvalueAlgorithm()(Code)



testIllegalCustomAlgorithm
public void testIllegalCustomAlgorithm()(Code)



testNonExistentCustomAlgorithm
public void testNonExistentCustomAlgorithm()(Code)



testPropcacheInvalid
public void testPropcacheInvalid()(Code)
Propertycache must have a set 'cachefile' attribute. The default in ModifiedSelector "cache.properties" is set by the selector.



testPropertyfileCache
public void testPropertyfileCache()(Code)



testResourceSelectorScenarioSimple
public void testResourceSelectorScenarioSimple()(Code)



testResourceSelectorSelresFalse
public void testResourceSelectorSelresFalse()(Code)



testResourceSelectorSelresTrue
public void testResourceSelectorSelresTrue()(Code)



testResourceSelectorSimple
public void testResourceSelectorSimple()(Code)



testRuleComparator
public void testRuleComparator()(Code)



testScenario1
public void testScenario1()(Code)
Complex test scenario using default values (DigestAlgorithm with MD5, PropertiesfileCache with file=cache.properties, EqualComparator and update=true).
  1. try fist time --> should select all
  2. try second time --> should select no files (only directories)
  3. modify timestamp of one file and content of a nother one
  4. try third time --> should select only the file with modified content



testScenarioCoreSelectorDefaults
public void testScenarioCoreSelectorDefaults()(Code)



testScenarioCoreSelectorSettings
public void testScenarioCoreSelectorSettings()(Code)



testScenarioCustomSelectorSettings
public void testScenarioCustomSelectorSettings()(Code)



testSeldirs
public void testSeldirs()(Code)
Tests whether the seldirs attribute is used.



testValidateWrongAlgorithm
public void testValidateWrongAlgorithm()(Code)
Test right use of cache names.



testValidateWrongCache
public void testValidateWrongCache()(Code)
Test right use of cache names.



testValidateWrongComparator
public void testValidateWrongComparator()(Code)
Test right use of comparator names.



Fields inherited from org.apache.tools.ant.types.selectors.BaseSelectorTest
protected File basedir(Code)(Java Doc)
protected String basedirname(Code)(Java Doc)
protected File beddir(Code)(Java Doc)
protected String beddirname(Code)(Java Doc)
protected String[] filenames(Code)(Java Doc)
protected File[] files(Code)(Java Doc)
protected File mirrordir(Code)(Java Doc)
protected String mirrordirname(Code)(Java Doc)
protected File[] mirrorfiles(Code)(Java Doc)

Methods inherited from org.apache.tools.ant.types.selectors.BaseSelectorTest
protected void cleanupBed()(Code)(Java Doc)
protected void cleanupMirror()(Code)(Java Doc)
public String diff(String expected, String result)(Code)(Java Doc)
abstract public BaseSelector getInstance()(Code)(Java Doc)
public Project getProject()(Code)(Java Doc)
public BaseSelector getSelector()(Code)(Java Doc)
protected void makeBed()(Code)(Java Doc)
protected void makeMirror()(Code)(Java Doc)
public String mirrorSelectionString(FileSelector selector)(Code)(Java Doc)
public void performTests(FileSelector selector, String expected)(Code)(Java Doc)
public String resolve(String filelist)(Code)(Java Doc)
public String selectionString(FileSelector selector)(Code)(Java Doc)
public String selectionString(File basedir, File[] files, FileSelector selector)(Code)(Java Doc)
public void setUp()(Code)(Java Doc)
public void testRespondsToError()(Code)(Java Doc)

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