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
Class Test(val someInt: Int) | |
val test1: Test // warning: no default value, should be initialized | |
// with non-null value before first use | |
val test2: Test = null // error: non-nullable type can't hold null value | |
val test3: Test? = null // valid |
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
val someStr1: String? = null // valid statement, notice a question mark after 'String' | |
val someStr2: String? // warning: no default value assigned. Should be initialized | |
// with some (nullable or non-nullable) value before its first use |
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
val someStr1: String = "" // same as in Java, i.e initialized with empty string | |
val someStr2: String // warning: no default value assigned. Should be initialized | |
// with a non-null value before its first use | |
val someStr3: String = null // error: can't be null |
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
String someStr1 = ""; // initialized with empty string | |
String someStr2; // by default value of someStr2 is null |
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
@Test | |
public void FilterClickShouldChangeRecyclerViewCount() { | |
// Get items count before action | |
RecyclerView recyclerView = mActivityTestRule.getActivity().findViewById(R.id.recycler_view); | |
int countBefore = Objects.requireNonNull(recyclerView.getAdapter()).getItemCount(); | |
Log.e("count", "Items count before: " + countBefore); | |
// Perform action | |
ViewInteraction actionMenuItemView = onView( | |
allOf( |
NewerOlder