File tree Expand file tree Collapse file tree
main/java/com/javalearning
test/java/com/javalearning Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
2+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
3+ <parent >
4+ <artifactId >javalearning</artifactId >
5+ <groupId >com.javalearning</groupId >
6+ <version >1.0-SNAPSHOT</version >
7+ </parent >
8+ <modelVersion >4.0.0</modelVersion >
9+
10+ <artifactId >apacheexample</artifactId >
11+ <packaging >jar</packaging >
12+
13+ <name >apacheexample</name >
14+ <url >http://maven.apache.org</url >
15+
16+ <properties >
17+ <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
18+ </properties >
19+
20+ <dependencies >
21+ <dependency >
22+ <groupId >junit</groupId >
23+ <artifactId >junit</artifactId >
24+ </dependency >
25+ <dependency >
26+ <groupId >org.apache.commons</groupId >
27+ <artifactId >commons-collections4</artifactId >
28+ </dependency >
29+ <dependency >
30+ <groupId >org.apache.commons</groupId >
31+ <artifactId >commons-lang3</artifactId >
32+ </dependency >
33+ </dependencies >
34+ </project >
Original file line number Diff line number Diff line change 1+ package com .javalearning .math ;
2+
3+ import org .apache .commons .lang3 .math .Fraction ;
4+
5+ /**
6+ * Created by renqun.yuan on 2015/11/3.
7+ */
8+ public class FractionExample {
9+ public static void main (String [] args ) {
10+ Fraction fraction = Fraction .getFraction (1 , 3 , 4 );
11+ double value = fraction .doubleValue ();
12+ System .out .println (value );
13+ }
14+ }
Original file line number Diff line number Diff line change 1+ /**
2+ * Created by renqun.yuan on 2015/11/3.
3+ */
4+ package com .javalearning ;
Original file line number Diff line number Diff line change 1+ package com .javalearning ;
2+
3+ import junit .framework .Test ;
4+ import junit .framework .TestCase ;
5+ import junit .framework .TestSuite ;
6+
7+ /**
8+ * Unit test for simple App.
9+ */
10+ public class AppTest
11+ extends TestCase
12+ {
13+ /**
14+ * Create the test case
15+ *
16+ * @param testName name of the test case
17+ */
18+ public AppTest ( String testName )
19+ {
20+ super ( testName );
21+ }
22+
23+ /**
24+ * @return the suite of tests being tested
25+ */
26+ public static Test suite ()
27+ {
28+ return new TestSuite ( AppTest .class );
29+ }
30+
31+ /**
32+ * Rigourous Test :-)
33+ */
34+ public void testApp ()
35+ {
36+ assertTrue ( true );
37+ }
38+ }
Original file line number Diff line number Diff line change 1414 <module >designPatterns</module >
1515 <module >guavaExample</module >
1616 <module >questionInwork</module >
17+ <module >apacheCommons</module >
1718 </modules >
1819
1920 <properties >
2223 <guava .version>18.0</guava .version>
2324 <spring-data-elasticsearch .version>1.2.0.RELEASE</spring-data-elasticsearch .version>
2425 <org .springframework.version>4.1.1.RELEASE</org .springframework.version>
26+ <commons-collections4 .version>4.0</commons-collections4 .version>
27+ <commons-lang3 .version>3.4</commons-lang3 .version>
2528 </properties >
2629
2730 <dependencyManagement >
5356 <version >${org.springframework.version} </version >
5457 <scope >test</scope >
5558 </dependency >
59+ <dependency >
60+ <groupId >org.apache.commons</groupId >
61+ <artifactId >commons-collections4</artifactId >
62+ <version >${commons-collections4.version} </version >
63+ </dependency >
64+ <dependency >
65+ <groupId >org.apache.commons</groupId >
66+ <artifactId >commons-lang3</artifactId >
67+ <version >${commons-lang3.version} </version >
68+ </dependency >
5669 </dependencies >
5770 </dependencyManagement >
5871
You can’t perform that action at this time.
0 commit comments