Skip to content

Commit 2ad8148

Browse files
committed
src
1 parent 3fec463 commit 2ad8148

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
bin/
2+
build/
3+
*.class
4+
*.jar
5+
.settings/
6+
.gradle/
7+
.classpath
8+
.project
9+

src/api/java/doubler/Doubler.java

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package doubler;
2+
3+
public interface Doubler {
4+
int doubleIt(int toDouble);
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package doubler.impl;
2+
3+
import doubler.Doubler;
4+
5+
public class DoublerImpl implements Doubler {
6+
public int doubleIt(int toDouble) {
7+
return toDouble * 2;
8+
}
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package doubler.impl;
2+
3+
import doubler.Doubler;
4+
import org.junit.Test;
5+
6+
public class DoublerImplTest {
7+
8+
@Test
9+
public void testIt() {
10+
Doubler doubler = new DoublerImpl();
11+
assert doubler.doubleIt(2) == 4;
12+
}
13+
}

0 commit comments

Comments
 (0)