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
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <color name="launcher_background_color">@android:color/system_neutral1_800</color> | |
| <color name="launcher_foreground_android_color">@android:color/system_accent1_100</color> | |
| </resources> |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <color name="launcher_background_color">#3DDC84</color> | |
| <color name="launcher_foreground_android_color">#FFFFFF</color> | |
| </resources> |
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
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:aapt="http://schemas.android.com/aapt" | |
| android:width="108dp" | |
| android:height="108dp" | |
| android:viewportWidth="108" | |
| android:viewportHeight="108"> | |
| <path | |
| android:fillColor="@color/launcher_foreground_android_color" | |
| android:fillType="nonZero" |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:width="108dp" | |
| android:height="108dp" | |
| android:viewportWidth="108" | |
| android:viewportHeight="108"> | |
| <path | |
| android:fillColor="@color/launcher_background_color" | |
| android:pathData="M0,0h108v108h-108z" /> |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <background android:drawable="@drawable/ic_launcher_background" /> | |
| <foreground android:drawable="@drawable/ic_launcher_foreground" /> | |
| </adaptive-icon> |
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 DetailsViewMvcImplTest : Spek({ | |
| describe("The DetailsViewMvcImpl") { | |
| var mockButton: MaterialButton? = null | |
| var mockPhoto: AppCompatImageView? = null | |
| var mockRootView: View? = null | |
| var mockTitle: AppCompatTextView? = null | |
| var uut: DetailsViewMvcImpl? = null |
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 DetailsViewMvcImpl() { | |
| val button: MaterialButton | |
| val photo: AppCompatImageView | |
| val title: AppCompatTextView | |
| init { | |
| rootView = inflater.inflate(R.layout.details_fragment, parent, false) | |
| button = findViewById(R.id.view_online_button) |
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
| whenever(userService.getUserName()).thenReturn("jsmith") | |
| whenever(userService.getUserId()).thenReturn("123-456") | |
| whenever(userService.getUrlToAvatarImage(any())).thenReturn("https://ddg.co/") // Generic matcher is prone to error |
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
| whenever(userService.getUserName()).thenReturn("jsmith") | |
| whenever(userService.getUserId()).thenReturn("123-456") // Output from here... | |
| whenever(userService.getUrlToAvatarImage("123-456")).thenReturn("https://ddg.co/") // ... feeds into here |
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 PhotosControllerTest : Spek({ | |
| describe("The PhotosController") { | |
| var mockPhotosApiService: PhotosApiService? = null | |
| var mockSchedulerForwarder: SchedulerForwarder? = null | |
| var uut: PhotosController? = null | |
| beforeEachTest { | |
| // uut and supporting classes setup and mocked here | |
| } |