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
@JvmOverloads | |
fun joinStrings( | |
collection: Collection<String>, | |
separator: String = "," | |
): String { | |
val result = StringBuffer() | |
val firstElement = 0 | |
for((index, word) in collection.withIndex()) { | |
if(index != firstElement) result.append(separator) | |
result.append(word) |
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
import java.util.Arrays; | |
public class Test { | |
public static void main(String[] args) { | |
FunWithDefaultValuesKt.joinStrings(Arrays.asList("Thiago", "Lopes", "silva")); | |
} | |
} |
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
fun joinStrings( | |
collection: Collection<String>, | |
separator: String = "," | |
): String { | |
val result = StringBuffer() | |
val firstElement = 0 | |
for((index, word) in collection.withIndex()) { | |
if(index != firstElement) result.append(separator) | |
result.append(word) | |
} |
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
Espresso.onView(ViewMatchers.withId(R.id.btn_login)) | |
.check(ViewAssertions.matches(ViewMatchers.isDisplayed())) | |
.perform(ViewActions.click()) | |
.check(ViewAssertions.matches(CustomViewMatchers.withDummyStatus(LoginButton.DummyStatus.ERROR))); |
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 static Matcher<View> withDummyStatus(final LoginButton.DummyStatus expectedStatus) { | |
return new BoundedMatcher<View, LoginButton>(LoginButton.class) { | |
@Override | |
public void describeTo(Description description) { | |
description.appendText("Checking the matcher on received view: "); | |
description.appendText("with expectedStatus=" + expectedStatus.toString()); | |
} | |
@Override |
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
<ProgressBar | |
android:id="@+id/progress_bar" | |
style="?android:attr/progressBarStyleLarge" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_centerHorizontal="true" | |
android:layout_centerVertical="true"/> |
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
final String javaSetFlavourMessage = Constants.BUILD_NAME; |
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
/** | |
* The constant BUILD_NAME. | |
*/ | |
public static final String BUILD_NAME = "development"; |
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
/** | |
* The constant BUILD_NAME. | |
*/ | |
public static final String BUILD_NAME = "production"; |