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 arrow.Kind | |
import arrow.core.ForEither | |
import arrow.core.Option | |
import com.txusballesteros.codelabs.billboard.api.movie.MovieApi | |
import com.txusballesteros.codelabs.billboard.core.domain.mapper.map | |
import com.txusballesteros.codelabs.billboard.core.domain.model.Movie | |
internal class MovieCloudDataSource<F>( | |
private val api: MovieApi |
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
package com.fortyseven.fptraining | |
import arrow.core.Either | |
import arrow.core.right | |
import arrow.effects.IO | |
import arrow.effects.extensions.io.fx.fx | |
data class Account(val balance: Int) | |
data class AccountEntity(val balance: Int) |
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 android.animation.ValueAnimator | |
import android.content.Context | |
import android.graphics.* | |
import android.util.AttributeSet | |
import android.util.TypedValue | |
import android.view.View | |
import android.view.animation.DecelerateInterpolator | |
class OnboardingPageIndicatorView @JvmOverloads constructor( | |
context: Context, |
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
package com.txusballesteros.mytaxi.core.domain.repository | |
import com.pholser.junit.quickcheck.generator.GenerationStatus | |
import com.pholser.junit.quickcheck.generator.Generator | |
import com.pholser.junit.quickcheck.random.SourceOfRandomness | |
import com.txusballesteros.mytaxi.core.domain.model.MapState | |
class MapStatePropertyGenerator: Generator<MapState>(MapState::class.java) { | |
companion object { | |
private val MINIMUM_VALUE = 0 |
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 NowPlayingCloudDataSourceTest : UnitTest() { | |
companion object { | |
private const val PAGE = 123 | |
private val MODEL = MovieApiModel( | |
1, | |
"originalTitle", | |
"en", | |
"title", | |
"overview", | |
"2017-08-23", |
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
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.constraint.ConstraintLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="#b2ebf2"> | |
<android.support.constraint.ConstraintLayout | |
android:layout_width="110dp" |
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
package com.txusballesteros.instrumentacion.assertion | |
import android.support.test.espresso.EspressoException | |
import android.support.test.espresso.ViewAssertion | |
import android.support.test.espresso.matcher.ViewMatchers.assertThat | |
import android.support.v7.widget.RecyclerView | |
import android.view.View | |
import android.view.View.FIND_VIEWS_WITH_TEXT | |
import android.widget.TextView | |
import org.hamcrest.Matchers.greaterThan |
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 android.support.v7.widget.RecyclerView | |
import android.view.View | |
import android.view.View.GONE | |
import android.view.View.VISIBLE | |
fun RecyclerView.setEmptyView(view: View) { | |
adapter?.apply { | |
val observer = object: RecyclerView.AdapterDataObserver() { | |
override fun onChanged() { | |
view.visibility = if (adapter.isEmpty()) VISIBLE else GONE |
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
machine: | |
environment: | |
_JAVA_OPTIONS: "-Xms512m -Xmx1024m" | |
ANDROID_HOME: /usr/local/android-sdk-linux | |
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"' | |
dependencies: | |
pre: | |
- echo y | android update sdk --no-ui --all --filter tools,platform-tools,android-25 | |
- echo y | android update sdk --no-ui --all --filter build-tools-25.0.2 |
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
/* | |
* Copyright Txus Ballesteros 2015 (@txusballesteros) | |
* | |
* This file is part of some open source application. | |
* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you under the Apache License, Version 2.0 (the |