I hereby claim:
- I am ditn on github.
- I am ditn (https://keybase.io/ditn) on keybase.
- I have a public key ASDV52_00ivgIYPfFgWITbZmwdNHhnc2JMPd8nOigAy1Xwo
To claim this, I am signing this object:
| class ExampleTest { | |
| private val subject: ClassToTest = mock() | |
| @Test | |
| fun `verify this causes that`() { | |
| // Arrange | |
| val aValue = 10 | |
| whenever(mockedClass.getValue()).thenReturn(aValue) | |
| // Act |
| class ExampleTest { | |
| @Mock private var subject: ClassToTest? | |
| @Before | |
| fun setUp() { | |
| MockitoAnnotations.initMocks(this) | |
| } | |
| @Test |
| /** | |
| * Loads a font via the Support Library downloadable font system and applies it to a TextView. If this | |
| * function fails, it will do so silently. | |
| * | |
| * @param customFont A [CustomFont] object that encapsulates the query to be sent to the fonts provider | |
| */ | |
| fun TextView.setCustomFont(customFont: CustomFont) { | |
| loadFont(context, customFont) { | |
| this.typeface = it | |
| } |
| fun loadFont(context: Context, font: CustomFont, func: (Typeface) -> Unit) { | |
| val handlerThread = HandlerThread("fonts").apply { start() } | |
| val handler = Handler(handlerThread.looper) | |
| val request = FontRequest( | |
| "com.google.android.gms.fonts", | |
| "com.google.android.gms", | |
| font.query, | |
| R.array.com_google_android_gms_fonts_certs | |
| ) |
| <?xml version="1.0" encoding="utf-8"?> | |
| <font-family xmlns:app="http://schemas.android.com/apk/res-auto" | |
| app:fontProviderAuthority="com.google.android.gms.fonts" | |
| app:fontProviderPackage="com.google.android.gms" | |
| app:fontProviderQuery="Montserrat" | |
| app:fontProviderCerts="@array/com_google_android_gms_fonts_certs"> | |
| </font-family> |
| fun printString(string: String) = println(string) | |
| /** | |
| * Prints successfully | |
| */ | |
| Observable.just("Test string") | |
| .doOnNext{ printString(it) } | |
| .subscribe() |
I hereby claim:
To claim this, I am signing this object:
| Verifying that "iateyourmic.id" is my Blockstack ID. https://onename.com/iateyourmic |