KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > fr > jayasoft > ivy > DefaultDependencyDescriptorTest


1
2 /* ----------------------------------------------------------------
3  * FILENAME : DefaultDependencyDescriptorTest.java
4  * DESCRIPTION : TODO Simple class to demonstrate good coding style.
5  * Optional if javadoc for the class is present
6  *
7  * PROJECT : Coding standards
8  * GROUP : Strategic Trading Initiatives
9  *
10  * PROGRAMMER : baumkar
11  *
12  * COPYRIGHT : Copyright (c) 2005 - The Goldman, Sachs Group, Inc. - All rights reserved
13  *
14  * Created: Mar 5, 2006
15  * Source : $Source: $
16  * Revision : $Revision: $
17  * Last Changed: $Date: $
18  * ---------------------------------------------------------------- */

19
20 package fr.jayasoft.ivy;
21
22 import junit.framework.TestCase;
23
24 public class DefaultDependencyDescriptorTest extends TestCase {
25
26     public static void main(String JavaDoc[] args) {
27         junit.textui.TestRunner.run(DefaultDependencyDescriptorTest.class);
28     }
29
30     /*
31      * Test method for 'fr.jayasoft.ivy.DefaultDependencyDescriptor.replaceSelfFallbackPattern(String, String)'
32      */

33     public void testReplaceSelfFallbackPattern() {
34         String JavaDoc replacedConf = DefaultDependencyDescriptor.replaceSelfFallbackPattern("@(default)", "compile");
35         assertEquals("compile(default)", replacedConf);
36         
37         replacedConf = DefaultDependencyDescriptor.replaceSelfFallbackPattern("default", "compile");
38         assertNull( replacedConf);
39         
40         replacedConf = DefaultDependencyDescriptor.replaceSelfFallbackPattern("@", "runtime");
41         assertEquals("runtime", "runtime");
42
43     }
44
45     /*
46      * Test method for 'fr.jayasoft.ivy.DefaultDependencyDescriptor.replaceThisFallbackPattern(String, String)'
47      */

48     public void testReplaceThisFallbackPattern() {
49         String JavaDoc replacedConf = DefaultDependencyDescriptor.replaceThisFallbackPattern("#(default)", "compile");
50         assertEquals("compile(default)", replacedConf);
51         
52         replacedConf = DefaultDependencyDescriptor.replaceThisFallbackPattern("default", "compile");
53         assertNull( replacedConf);
54         
55         replacedConf = DefaultDependencyDescriptor.replaceThisFallbackPattern("#", "runtime");
56         assertEquals("runtime", "runtime");
57
58     }
59
60 }
61
62
Popular Tags