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
/** | |
* When Mockito mock methods or members that return String, the returned value is null, even when the return is | |
* non-nullable. This extension function will return empty strings instead of null for all cases. | |
*/ | |
fun <T: Any> KStubbing<T>.returnEmptyStringsInsteadOfNulls() = | |
mock::class.members | |
.filter { it.returnType == typeOf<String>() || it.returnType == typeOf<String?>() } | |
.forEach { on { it.call(this) }.thenReturn("") } |
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
#!/bin/sh | |
for i in * .*; do | |
if [ -d "$i" ] && [ ".." != "$i" ]; then | |
dirname="$i" | |
dircount=`find "$i" | wc -l` | |
echo "$dircount\t$dirname" | |
fi | |
done |