Permalink
Browse files

Moar documentations.

  • Loading branch information...
designatednerd committed May 20, 2015
1 parent 85f6bcd commit fecc5c808c5550381472a62d2c808affada060ac
@@ -17,6 +17,9 @@
/**
* Created by ellen on 5/19/15.
*
* A test suite to show off some of the functionality of the AndroidJUnit4 runner.
* Note that RunWith is not necessary here since the runner is set in build.gradle.
*/
public class JUnit4TestExample {
@@ -13,8 +13,10 @@
/**
* Created by ellen on 5/19/15.
*
* A class to show off how to use parameterized tests with JUnit 4.
* Note: Needs RunWith annotation since it's using a more specific runner than the standard.
*/
//Needs RunWith annotation since it's using a more specific runner.
@RunWith(Parameterized.class)
public class ParameterTestExample {
@@ -6,6 +6,14 @@
*/
public class CommonLetterFinder {
/**
* Method to find common letters, respecting case.
*
* @param aFirstString The first string to compare.
* @param aSecondString The second string to compare.
* @return The common letters in the string, in the order in which they exist in
* the first param, or null if there are no common letters.
*/
public String commonLetters(String aFirstString, String aSecondString) {
if (aFirstString != null && aSecondString != null) {
StringBuilder builder = new StringBuilder();
@@ -30,6 +38,14 @@ public String commonLetters(String aFirstString, String aSecondString) {
return null;
}
/**
* Method to find common letters, ignoring case.
*
* @param aFirstString The first string to compare,
* @param aSecondString The second string to compare.
* @return The common letters in the string, in the order in which they exist in
* the first param, or null if there are no common letters.
*/
public String commonLettersCaseInsensitive(String aFirstString, String aSecondString) {
if (aFirstString != null && aSecondString != null) {
return commonLetters(aFirstString.toLowerCase(), aSecondString.toLowerCase());

0 comments on commit fecc5c8

Please sign in to comment.