Last active
December 15, 2015 14:19
-
-
Save strootman/5274001 to your computer and use it in GitHub Desktop.
Starts at "testBooleanToSplittableConversion"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void testBooleanToSplittableConversion(){ | |
testNullCheck(convertBooleanWithCreate(Boolean.FALSE)); // WILL NOT "do stuff" | |
testNullCheck(convertBooleanWithSplit(Boolean.FALSE)); // WILL "do stuff" | |
testNullCheck(convertBooleanWithCreate(Boolean.TRUE)); // WILL "do stuff" | |
testNullCheck(convertBooleanWithSplit(Boolean.TRUE)); // WILL "do stuff" | |
} | |
public void testNullCheck(Splittable testval){ | |
if(testval != null){ | |
// "do stuff" | |
} | |
} | |
public Splittable convertBooleanWithCreate(Boolean object) { | |
if(object == null){ | |
object = Boolean.FALSE; | |
} | |
return StringQuoter.create(object); | |
} | |
public Splittable convertBooleanWithSplit(Boolean object) { | |
if(object == null){ | |
object = Boolean.FALSE; | |
} | |
return StringQuoter.split(String.valueOf(object)); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment