-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from MyDogTom/replace-structure
introduced submodules, added kotlin extension functions
- Loading branch information
Showing
18 changed files
with
241 additions
and
136 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,10 @@ | ||
*.class | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.ear | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
|
||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm | ||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | ||
|
||
# User-specific stuff: | ||
.idea/workspace.xml | ||
.idea/tasks.xml | ||
|
||
# Sensitive or high-churn files: | ||
.idea/dataSources.ids | ||
.idea/dataSources.xml | ||
.idea/dataSources.local.xml | ||
.idea/sqlDataSources.xml | ||
.idea/dynamic.xml | ||
.idea/uiDesigner.xml | ||
|
||
# Gradle: | ||
.idea/gradle.xml | ||
.idea/libraries | ||
|
||
# Mongo Explorer plugin: | ||
.idea/mongoSettings.xml | ||
|
||
## File-based project format: | ||
*.iws | ||
|
||
## Plugin-specific files: | ||
|
||
# IntelliJ | ||
/out/ | ||
|
||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
# Crashlytics plugin (for Android Studio and IntelliJ) | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
fabric.properties | ||
|
||
|
||
.gradle/* | ||
.idea/* | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/workspace.xml | ||
/.idea/libraries | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild | ||
.idea/* |
File renamed without changes.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,40 @@ | ||
group 'com.github.mydogtom' | ||
version '0.1' | ||
// Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
|
||
apply plugin: 'java' | ||
buildscript { | ||
repositories { | ||
jcenter() | ||
} | ||
dependencies { | ||
|
||
sourceCompatibility = 1.8 | ||
// NOTE: Do not place your application dependencies here; they belong | ||
// in the individual module build.gradle files | ||
} | ||
ext.kotlin_version = '1.0.4' | ||
dependencies { | ||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | ||
} | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
jcenter() | ||
} | ||
|
||
repositories { | ||
jcenter() | ||
} | ||
|
||
def RXJAVA_VERSION = '1.2.1' | ||
|
||
dependencies { | ||
compile "io.reactivex:rxjava:$RXJAVA_VERSION" | ||
subprojects{ | ||
apply plugin: 'java' | ||
test { | ||
testLogging.events('failed', 'passed', 'skipped') | ||
} | ||
} | ||
|
||
testCompile 'junit:junit:4.12' | ||
testCompile "io.reactivex:rxjava:$RXJAVA_VERSION" | ||
ext { | ||
RXJAVA_VERSION = "1.2.1" | ||
JUNIT_VERSION = "4.12" | ||
} | ||
|
||
task clean(type: Delete) { | ||
delete rootProject.buildDir | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Project-wide Gradle settings. | ||
|
||
# IDE (e.g. Android Studio) users: | ||
# Gradle settings configured through the IDE *will override* | ||
# any settings specified in this file. | ||
|
||
# For more details on how to configure your build environment visit | ||
# http://www.gradle.org/docs/current/userguide/build_environment.html | ||
|
||
# Specifies the JVM arguments used for the daemon process. | ||
# The setting is particularly useful for tweaking memory settings. | ||
org.gradle.jvmargs=-Xmx1536m | ||
|
||
# When configured, Gradle will run in incubating parallel mode. | ||
# This option should only be used with decoupled projects. More details, visit | ||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects | ||
# org.gradle.parallel=true |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Tue Oct 18 18:07:37 CEST 2016 | ||
#Mon Dec 28 10:00:20 PST 2015 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apply plugin: 'kotlin' | ||
|
||
sourceSets { | ||
main.java.srcDirs += 'src/main/kotlin' | ||
} | ||
sourceCompatibility = "1.8" | ||
targetCompatibility = "1.8" | ||
|
||
|
||
|
||
dependencies { | ||
compile fileTree(dir: 'libs', include: ['*.jar']) | ||
compile project(':rxtestwrapper') | ||
compile "io.reactivex:rxjava:$RXJAVA_VERSION" | ||
testCompile "junit:junit:$JUNIT_VERSION" | ||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | ||
} | ||
|
||
|
22 changes: 22 additions & 0 deletions
22
...apper-kotlin/src/main/kotlin/com/github/mydogtom/rxtestwrapper/RxTestWrapperExtensions.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.github.mydogtom.rxtestwrapper | ||
|
||
import rx.Completable | ||
import rx.Observable | ||
import rx.Single | ||
import rx.observables.BlockingObservable | ||
|
||
fun <T> Observable<T>.test() : RxTestWrapper<T>{ | ||
return RxTestWrapper.assertThat(this) | ||
} | ||
|
||
fun Completable.test() : RxTestWrapper<Any>{ | ||
return RxTestWrapper.assertThat(this) | ||
} | ||
|
||
fun <T> Single<T>.test() : RxTestWrapper<T>{ | ||
return RxTestWrapper.assertThat(this) | ||
} | ||
|
||
fun <T> BlockingObservable<T>.test() : RxTestWrapper<T>{ | ||
return RxTestWrapper.assertThat(this) | ||
} |
27 changes: 27 additions & 0 deletions
27
rxtestwrapper-kotlin/src/test/kotlin/com/github/mydogtom/rxtestwrapper/ExampleTest.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.github.mydogtom.rxtestwrapper | ||
|
||
import org.junit.Test | ||
import rx.Completable | ||
import rx.Observable | ||
import rx.Single | ||
|
||
class ExampleTest{ | ||
@Test fun testObservable() { | ||
Observable.just(1).test().hasValue(1).completed() | ||
} | ||
|
||
@Test | ||
fun testCompletable() { | ||
Completable.complete().test().completed() | ||
} | ||
|
||
@Test | ||
fun testSingle() { | ||
Single.just(1).test().hasValue(1).completed() | ||
} | ||
|
||
@Test | ||
fun testBlockingObservable() { | ||
Observable.just(1).toBlocking().test().hasValue(1).completed() | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
sourceCompatibility = "1.8" | ||
targetCompatibility = "1.8" | ||
dependencies { | ||
compile fileTree(dir: 'libs', include: ['*.jar']) | ||
compile "io.reactivex:rxjava:$RXJAVA_VERSION" | ||
testCompile "junit:junit:$JUNIT_VERSION" | ||
} | ||
|
||
|
||
|
||
|
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
Oops, something went wrong.