Skip to content

Commit fecc5c8

Browse files
Moar documentations.
1 parent 85f6bcd commit fecc5c8

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

AndroidListenerExamples/src/androidTest/java/com/designatednerd/androidlistenerexamples/test/JUnit4TestExample.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717

1818
/**
1919
* Created by ellen on 5/19/15.
20+
*
21+
* A test suite to show off some of the functionality of the AndroidJUnit4 runner.
22+
* Note that RunWith is not necessary here since the runner is set in build.gradle.
2023
*/
2124
public class JUnit4TestExample {
2225

AndroidListenerExamples/src/androidTest/java/com/designatednerd/androidlistenerexamples/test/ParameterTestExample.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313

1414
/**
1515
* Created by ellen on 5/19/15.
16+
*
17+
* A class to show off how to use parameterized tests with JUnit 4.
18+
* Note: Needs RunWith annotation since it's using a more specific runner than the standard.
1619
*/
17-
//Needs RunWith annotation since it's using a more specific runner.
1820
@RunWith(Parameterized.class)
1921
public class ParameterTestExample {
2022

AndroidListenerExamples/src/main/java/com/designatednerd/androidlistenerexamples/model/CommonLetterFinder.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
*/
77
public class CommonLetterFinder {
88

9+
/**
10+
* Method to find common letters, respecting case.
11+
*
12+
* @param aFirstString The first string to compare.
13+
* @param aSecondString The second string to compare.
14+
* @return The common letters in the string, in the order in which they exist in
15+
* the first param, or null if there are no common letters.
16+
*/
917
public String commonLetters(String aFirstString, String aSecondString) {
1018
if (aFirstString != null && aSecondString != null) {
1119
StringBuilder builder = new StringBuilder();
@@ -30,6 +38,14 @@ public String commonLetters(String aFirstString, String aSecondString) {
3038
return null;
3139
}
3240

41+
/**
42+
* Method to find common letters, ignoring case.
43+
*
44+
* @param aFirstString The first string to compare,
45+
* @param aSecondString The second string to compare.
46+
* @return The common letters in the string, in the order in which they exist in
47+
* the first param, or null if there are no common letters.
48+
*/
3349
public String commonLettersCaseInsensitive(String aFirstString, String aSecondString) {
3450
if (aFirstString != null && aSecondString != null) {
3551
return commonLetters(aFirstString.toLowerCase(), aSecondString.toLowerCase());

0 commit comments

Comments
 (0)