This file contains hidden or 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
apply plugin: 'com.android.application' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
android { | |
compileSdkVersion 29 | |
buildToolsVersion "29.0.2" | |
defaultConfig { |
This file contains hidden or 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
package com.example.mock | |
import androidx.test.espresso.Espresso.onView | |
import androidx.test.espresso.action.ViewActions | |
import androidx.test.espresso.assertion.ViewAssertions | |
import androidx.test.espresso.matcher.ViewMatchers | |
import androidx.test.ext.junit.runners.AndroidJUnit4 | |
import androidx.test.rule.ActivityTestRule | |
import okhttp3.mockwebserver.MockResponse | |
import okhttp3.mockwebserver.MockWebServer |
This file contains hidden or 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
{ | |
"data": { | |
"characters": [ | |
{ | |
"name": "Geralt of Rivia", | |
"id": "5d5ae34a799ab50008ba95a0" | |
}, | |
{ | |
"name": "Vesemir", | |
"id": "5d5aeb47799ab50008ba95a7" |
This file contains hidden or 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
curl --request GET 'https://e9a464b0-809c-4c35-be1d-846daa45ed96.mock.pstmn.io/characters' |
This file contains hidden or 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
floatingActionButton: FloatingActionButton(onPressed: _incrementCounter, | |
tooltip: 'Increment', | |
child: Icon(Icons.add)) |
This file contains hidden or 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 _MyHomePageState extends State<MyHomePage> { | |
int _counter = 0; | |
void _incrementCounter() { | |
setState(() { | |
_counter++; | |
}); | |
} | |
@override |
This file contains hidden or 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 _MyHomePageState extends State<MyHomePage> { | |
int _counter = 0; | |
incrementCounter(newNumber) { | |
setState(() { | |
_counter = newNumber; | |
}); | |
} | |
@override |
This file contains hidden or 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 _MyHomePageState extends State<MyHomePage> { | |
int _counter = 0; | |
incrementCounter(newNumber) { | |
setState(() { | |
_counter = newNumber; | |
}); | |
} | |
@override |
This file contains hidden or 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
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@+id/widget_item_wrapper" | |
android:layout_width="match_parent" | |
android:layout_height="40dp" | |
android:background="@drawable/background_widget_white"> | |
<TextView | |
android:id="@+id/remaining_text" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" |
This file contains hidden or 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 itWillReturnTrue() { | |
String expected = "Ramesh"; | |
String actual = "Ramesh"; | |
assertEquals(expected, actual); | |
} |