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 au.com.qantas.qantas.common.presentation; | |
import android.content.Context; | |
import android.support.design.widget.AppBarLayout; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.support.v4.widget.SwipeRefreshLayout; | |
public class AppbarSwipeRefreshLayout extends SwipeRefreshLayout implements | |
AppBarLayout.OnOffsetChangedListener { |
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
classpath 'org.codehaus.groovy:gradle-groovy-android-plugin:0.3.8' |
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
apply plugin: 'groovyx.grooid.groovy-android' | |
//...... | |
testCompile 'org.codehaus.groovy:groovy:2.4.5:grooid' | |
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4' | |
testCompile 'cglib:cglib-nodep:3.1' |
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.theiconic.spockexamples | |
import spock.lang.Specification | |
class SimpleAdditionSpec extends Specification { | |
def 'addition'() { | |
given: 'two integers' | |
def a = 1 | |
def b = 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
package com.theiconic.spockexamples.common.domain.usecases; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
import javax.inject.Inject; | |
public class ValidateEmailUseCase implements UseCase<String,Boolean> { | |
private static final Pattern VALID_EMAIL_ADDRESS_REGEX = | |
Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE); |
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.theiconic.spockexamples.common.domain.usecases | |
import com.theiconic.spockexamples.common.domain.usecases.ValidateEmailUseCase | |
import spock.lang.Specification | |
import spock.lang.Unroll | |
class ValidEmailUseCaseSpec extends Specification { | |
ValidateEmailUseCase useCase; |
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.theiconic.spockexamples.bag.domain.usecases | |
import com.theiconic.spockexamples.bag.domain.repositories.BagRepository | |
import com.theiconic.spockexamples.bag.domain.usecases.RemoveProductFromBagUseCase | |
import rx.Observable | |
import rx.observers.TestSubscriber | |
import spock.lang.Specification | |
class RemoveProductFromBagUseCaseSpec extends Specification{ | |
protected RemoveProductFromBagUseCase useCase; |
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.theiconic.spockexamples.bag.domain.usecases; | |
import com.theiconic.spockexamples.common.domain.usecases.ObservableUseCase; | |
import com.theiconic.spockexamples.bag.domain.repositories.BagRepository; | |
import javax.inject.Inject; | |
import rx.Observable; | |
public class RemoveProductFromBagUseCase implements ObservableUseCase<String, Boolean> { |
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
1 * useCase.repository.removeItem(simpleSku) >> Observable.just(out); |
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.theiconic.spockexamples.bag.domain.usecases; | |
import com.theiconic.spockexamples.bag.domain.repositories.BagRepository; | |
import com.theiconic.spockexamples.bag.domain.usecases.RemoveProductFromBagUseCase; | |
import com.theiconic.spockexamples.common.entities.BrandEntity; | |
import com.theiconic.spockexamples.common.entities.ImageEntity; | |
import com.theiconic.spockexamples.shop.entities.CatalogProductEntity; | |
import com.theiconic.spockexamples.shop.entities.CategoryEntity; | |
import org.junit.Before; |
OlderNewer