diff --git a/LICENSE b/LICENSE
index 5723b8e..38243a4 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,7 +1,7 @@
-MIT License
+The MIT License (MIT)
-Copyright (c) 2017 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
- and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ and Vasili Chyrvon (vasili.chyrvon@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -19,4 +19,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+SOFTWARE.
\ No newline at end of file
diff --git a/README.md b/README.md
index 8a68ad9..cec3ac5 100644
--- a/README.md
+++ b/README.md
@@ -325,11 +325,10 @@ Note that Command passes events only when PM is in the RESUMED state.
## License
```
+The MIT License (MIT)
-MIT License
-
-Copyright (c) 2017 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
- and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ and Vasili Chyrvon (vasili.chyrvon@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/build.gradle b/build.gradle
index 302ef21..5be9957 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,11 +1,12 @@
buildscript {
- ext.kotlinVersion = '1.3.72'
+ ext.kotlinVersion = '1.4.30'
repositories {
google()
+ mavenCentral()
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:4.0.1'
+ classpath 'com.android.tools.build:gradle:4.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
@@ -13,6 +14,7 @@ buildscript {
allprojects {
repositories {
google()
+ mavenCentral()
jcenter()
}
}
@@ -24,24 +26,24 @@ task clean(type: Delete) {
ext {
minSdkVersion = 16
- compileSdkVersion = 29
- targetSdkVersion = 29
+ compileSdkVersion = 30
+ targetSdkVersion = 30
rxBindingVersion = '3.1.0'
- annotation = 'androidx.annotation:annotation:1.2.0-alpha01'
- appCompat = 'androidx.appcompat:appcompat:1.3.0-alpha01'
- materialDesign = 'com.google.android.material:material:1.3.0-alpha01'
+ annotation = 'androidx.annotation:annotation:1.2.0-beta01'
+ appCompat = 'androidx.appcompat:appcompat:1.3.0-beta01'
+ materialDesign = 'com.google.android.material:material:1.3.0'
kotlinStdlib = "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
- rxJava2 = "io.reactivex.rxjava2:rxjava:2.2.19"
+ rxJava2 = "io.reactivex.rxjava2:rxjava:2.2.20"
rxRelay2 = "com.jakewharton.rxrelay2:rxrelay:2.1.1"
rxAndroid2 = "io.reactivex.rxjava2:rxandroid:2.1.1"
rxBinding = "com.jakewharton.rxbinding3:rxbinding:$rxBindingVersion"
rxBindingAppCompat = "com.jakewharton.rxbinding3:rxbinding-appcompat:$rxBindingVersion"
- conductor = "com.bluelinelabs:conductor:3.0.0-rc5"
+ conductor = "com.bluelinelabs:conductor:3.0.1"
junitKotlin = "org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion"
mockitoKotlin = 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0'
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 25d9068..6652a23 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Sat Jul 18 00:41:11 MSK 2020
+#Sun Feb 07 20:50:34 MSK 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
diff --git a/rxpm/androidmaven.gradle b/rxpm/androidmaven.gradle
deleted file mode 100644
index b6c1247..0000000
--- a/rxpm/androidmaven.gradle
+++ /dev/null
@@ -1,16 +0,0 @@
-apply plugin: 'com.github.dcendents.android-maven'
-
-group = publishedGroupId
-
-install {
- repositories.mavenInstaller {
- // This generates POM.xml with proper parameters
- pom {
- project {
- packaging 'aar'
- groupId publishedGroupId
- artifactId artifactId
- }
- }
- }
-}
\ No newline at end of file
diff --git a/rxpm/bintray.gradle b/rxpm/bintray.gradle
deleted file mode 100644
index 253da84..0000000
--- a/rxpm/bintray.gradle
+++ /dev/null
@@ -1,25 +0,0 @@
-apply plugin: 'com.jfrog.bintray'
-
-version = libraryVersion
-
-Properties properties = new Properties()
-properties.load(project.rootProject.file('local.properties').newDataInputStream())
-
-bintray {
-
- user = properties.getProperty("bintrayUser")
- key = properties.getProperty("bintrayApiKey")
-
- configurations = ['archives']
-
- pkg {
- repo = bintrayRepo
- name = bintrayName
- licenses = allLicenses
- vcsUrl = gitUrl
- publish = true
- }
-}
-
-// Dependency to call only bintrayUpload task
-bintrayUpload.dependsOn install
\ No newline at end of file
diff --git a/rxpm/build.gradle b/rxpm/build.gradle
index 7459a42..6faec92 100644
--- a/rxpm/build.gradle
+++ b/rxpm/build.gradle
@@ -1,13 +1,3 @@
-buildscript {
- repositories {
- jcenter()
- }
- dependencies {
- classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
- classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
- }
-}
-
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
@@ -59,25 +49,9 @@ dependencies {
}
ext {
- bintrayRepo = 'maven'
- bintrayName = 'RxPM'
- publishedGroupId = 'me.dmdev.rxpm'
- artifact = 'rxpm'
- libraryVersion = '2.1.1'
- gitUrl = 'https://github.com/dmdevgo/RxPM'
- allLicenses = ['MIT']
+ PUBLISH_GROUP_ID = 'me.dmdev.rxpm'
+ PUBLISH_VERSION = '2.1.2'
+ PUBLISH_ARTIFACT_ID = 'rxpm'
}
-// Configuration of the library uploading to the Bintray
-// Note: Call 'bintrayUpload' task (it will execute 'install' task first)
-apply from: 'androidmaven.gradle'
-apply from: 'bintray.gradle'
-
-task sourcesJar(type: Jar) {
- from android.sourceSets.main.java.srcDirs
- archiveClassifier.set("sources")
-}
-
-artifacts {
- archives sourcesJar
-}
+apply from: "publish-mavencentral.gradle"
\ No newline at end of file
diff --git a/rxpm/publish-mavencentral.gradle b/rxpm/publish-mavencentral.gradle
new file mode 100644
index 0000000..9e26db4
--- /dev/null
+++ b/rxpm/publish-mavencentral.gradle
@@ -0,0 +1,116 @@
+apply plugin: 'maven-publish'
+apply plugin: 'signing'
+
+task androidSourcesJar(type: Jar) {
+ archiveClassifier.set('sources')
+ if (project.plugins.findPlugin("com.android.library")) {
+ from android.sourceSets.main.java.srcDirs
+ } else {
+ from sourceSets.main.java.srcDirs
+ }
+}
+
+artifacts {
+ archives androidSourcesJar
+}
+
+
+group = PUBLISH_GROUP_ID
+version = PUBLISH_VERSION
+
+ext["signing.keyId"] = ''
+ext["signing.password"] = ''
+ext["signing.secretKeyRingFile"] = ''
+ext["ossrhUsername"] = ''
+ext["ossrhPassword"] = ''
+ext["sonatypeStagingProfileId"] = ''
+
+File secretPropsFile = project.rootProject.file('local.properties')
+if (secretPropsFile.exists()) {
+ Properties p = new Properties()
+ p.load(new FileInputStream(secretPropsFile))
+ p.each { name, value ->
+ ext[name] = value
+ }
+} else {
+ ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID')
+ ext["signing.password"] = System.getenv('SIGNING_PASSWORD')
+ ext["signing.secretKeyRingFile"] = System.getenv('SIGNING_SECRET_KEY_RING_FILE')
+ ext["ossrhUsername"] = System.getenv('OSSRH_USERNAME')
+ ext["ossrhPassword"] = System.getenv('OSSRH_PASSWORD')
+ ext["sonatypeStagingProfileId"] = System.getenv('SONATYPE_STAGING_PROFILE_ID')
+}
+
+publishing {
+ publications {
+ release(MavenPublication) {
+ groupId PUBLISH_GROUP_ID
+ artifactId PUBLISH_ARTIFACT_ID
+ version PUBLISH_VERSION
+ if (project.plugins.findPlugin("com.android.library")) {
+ artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
+ } else {
+ artifact("$buildDir/libs/${project.getName()}-${version}.jar")
+ }
+
+ artifact androidSourcesJar
+
+ pom {
+ name = PUBLISH_ARTIFACT_ID
+ description = 'Reactive implementation of Presentation Model pattern in Android'
+ url = 'https://github.com/dmdevgo/RxPM'
+ licenses {
+ license {
+ name = 'MIT'
+ url = 'https://github.com/dmdevgo/RxPM/blob/develop/LICENSE'
+ }
+ }
+ developers {
+ developer {
+ id = 'dmdev'
+ name = 'Dmitriy Gorbunov'
+ email = 'dmitriy.goto@gmail.com'
+ }
+ developer {
+ id = 'jeevuz'
+ name = 'Vasili Chyrvon'
+ email = 'vasili.chyrvon@gmail.com'
+ }
+ }
+ scm {
+ connection = 'scm:git@github.com:dmdevgo/RxPM.git'
+ developerConnection = 'scm:git@github.com:dmdevgo/RxPM.git'
+ url = 'https://github.com/dmdevgo/RxPM'
+ }
+ withXml {
+ def dependenciesNode = asNode().appendNode('dependencies')
+
+ project.configurations.implementation.allDependencies.each {
+ def dependencyNode = dependenciesNode.appendNode('dependency')
+ dependencyNode.appendNode('groupId', it.group)
+ dependencyNode.appendNode('artifactId', it.name)
+ dependencyNode.appendNode('version', it.version)
+ }
+ }
+ }
+ }
+ }
+ repositories {
+ maven {
+ name = "sonatype"
+
+ def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
+ def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
+ url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
+
+ credentials {
+ username ossrhUsername
+ password ossrhPassword
+ }
+ }
+ }
+}
+
+signing {
+ sign publishing.publications
+}
\ No newline at end of file
diff --git a/rxpm/src/main/AndroidManifest.xml b/rxpm/src/main/AndroidManifest.xml
index 0fcc750..9b804c8 100644
--- a/rxpm/src/main/AndroidManifest.xml
+++ b/rxpm/src/main/AndroidManifest.xml
@@ -1,2 +1,27 @@
+
+
\ No newline at end of file
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/Action.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/Action.kt
index 1884b82..aa2b1d4 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/Action.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/Action.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm
import android.annotation.*
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/Command.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/Command.kt
index 9ed9380..6709dab 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/Command.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/Command.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm
import com.jakewharton.rxrelay2.*
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/PmExtensions.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/PmExtensions.kt
index 88c3122..ccf9300 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/PmExtensions.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/PmExtensions.kt
@@ -1,10 +1,40 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm
-import com.jakewharton.rxrelay2.*
-import io.reactivex.*
-import io.reactivex.android.schedulers.*
-import io.reactivex.functions.*
-import me.dmdev.rxpm.util.*
+import com.jakewharton.rxrelay2.Relay
+import io.reactivex.Completable
+import io.reactivex.Maybe
+import io.reactivex.Observable
+import io.reactivex.Single
+import io.reactivex.android.schedulers.AndroidSchedulers
+import io.reactivex.functions.BiFunction
+import io.reactivex.functions.Consumer
+import me.dmdev.rxpm.util.BufferSingleValueWhileIdleOperator
+import me.dmdev.rxpm.util.BufferWhileIdleOperator
/**
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/PmView.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/PmView.kt
index b97434f..89be8d9 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/PmView.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/PmView.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm
/**
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/PresentationModel.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/PresentationModel.kt
index d97119f..9612c3e 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/PresentationModel.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/PresentationModel.kt
@@ -1,10 +1,39 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm
-import com.jakewharton.rxrelay2.*
-import io.reactivex.*
-import io.reactivex.disposables.*
-import io.reactivex.functions.*
-import me.dmdev.rxpm.navigation.*
+import com.jakewharton.rxrelay2.BehaviorRelay
+import io.reactivex.Flowable
+import io.reactivex.Maybe
+import io.reactivex.Observable
+import io.reactivex.Single
+import io.reactivex.disposables.CompositeDisposable
+import io.reactivex.disposables.Disposable
+import io.reactivex.functions.Consumer
+import me.dmdev.rxpm.navigation.NavigationalPm
/**
* Parent class for any Presentation Model.
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/State.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/State.kt
index 658d0ec..c936c4d 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/State.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/State.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm
import android.annotation.SuppressLint
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/base/PmActivity.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/base/PmActivity.kt
index e9cc715..ccd7a90 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/base/PmActivity.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/base/PmActivity.kt
@@ -1,10 +1,36 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.base
-import android.os.*
-import androidx.appcompat.app.*
-import me.dmdev.rxpm.*
-import me.dmdev.rxpm.delegate.*
-import me.dmdev.rxpm.delegate.PmActivityDelegate.*
+import android.os.Bundle
+import androidx.appcompat.app.AppCompatActivity
+import me.dmdev.rxpm.PmView
+import me.dmdev.rxpm.PresentationModel
+import me.dmdev.rxpm.delegate.PmActivityDelegate
+import me.dmdev.rxpm.delegate.PmActivityDelegate.RetainMode
/**
* Predefined [Activity][AppCompatActivity] implementing the [PmView][PmView].
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/base/PmBottomSheetDialogFragment.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/base/PmBottomSheetDialogFragment.kt
index 3c94717..e6496ea 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/base/PmBottomSheetDialogFragment.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/base/PmBottomSheetDialogFragment.kt
@@ -1,11 +1,37 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.base
-import android.os.*
-import android.view.*
-import com.google.android.material.bottomsheet.*
-import me.dmdev.rxpm.*
-import me.dmdev.rxpm.delegate.*
-import me.dmdev.rxpm.delegate.PmFragmentDelegate.*
+import android.os.Bundle
+import android.view.View
+import com.google.android.material.bottomsheet.BottomSheetDialogFragment
+import me.dmdev.rxpm.PmView
+import me.dmdev.rxpm.PresentationModel
+import me.dmdev.rxpm.delegate.PmFragmentDelegate
+import me.dmdev.rxpm.delegate.PmFragmentDelegate.RetainMode
/**
* Predefined [BottomSheetDialogFragment] implementing the [PmView][PmView].
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/base/PmController.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/base/PmController.kt
index 7b2af30..08cabb2 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/base/PmController.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/base/PmController.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.base
import android.os.Bundle
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/base/PmDialogFragment.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/base/PmDialogFragment.kt
index 7f4b511..de51eac 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/base/PmDialogFragment.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/base/PmDialogFragment.kt
@@ -1,11 +1,37 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.base
-import android.os.*
-import android.view.*
-import androidx.appcompat.app.*
-import me.dmdev.rxpm.*
-import me.dmdev.rxpm.delegate.*
-import me.dmdev.rxpm.delegate.PmFragmentDelegate.*
+import android.os.Bundle
+import android.view.View
+import androidx.appcompat.app.AppCompatDialogFragment
+import me.dmdev.rxpm.PmView
+import me.dmdev.rxpm.PresentationModel
+import me.dmdev.rxpm.delegate.PmFragmentDelegate
+import me.dmdev.rxpm.delegate.PmFragmentDelegate.RetainMode
/**
* Predefined [AppCompatDialogFragment] implementing the [PmView][PmView].
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/base/PmFragment.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/base/PmFragment.kt
index 2acb365..9840b23 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/base/PmFragment.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/base/PmFragment.kt
@@ -1,11 +1,37 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.base
-import android.os.*
-import android.view.*
-import androidx.fragment.app.*
-import me.dmdev.rxpm.*
-import me.dmdev.rxpm.delegate.*
-import me.dmdev.rxpm.delegate.PmFragmentDelegate.*
+import android.os.Bundle
+import android.view.View
+import androidx.fragment.app.Fragment
+import me.dmdev.rxpm.PmView
+import me.dmdev.rxpm.PresentationModel
+import me.dmdev.rxpm.delegate.PmFragmentDelegate
+import me.dmdev.rxpm.delegate.PmFragmentDelegate.RetainMode
/**
* Predefined [Fragment] implementing the [PmView][PmView].
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/delegate/CommonDelegate.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/delegate/CommonDelegate.kt
index d6b34b2..1025ede 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/delegate/CommonDelegate.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/delegate/CommonDelegate.kt
@@ -1,9 +1,37 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.delegate
-import android.os.*
-import me.dmdev.rxpm.*
-import me.dmdev.rxpm.PresentationModel.*
-import me.dmdev.rxpm.navigation.*
+import android.os.Bundle
+import me.dmdev.rxpm.PmView
+import me.dmdev.rxpm.PresentationModel
+import me.dmdev.rxpm.PresentationModel.Lifecycle
+import me.dmdev.rxpm.bindTo
+import me.dmdev.rxpm.navigation.NavigationMessageDispatcher
+import me.dmdev.rxpm.navigation.NavigationalPm
import java.util.*
/**
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/delegate/PmActivityDelegate.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/delegate/PmActivityDelegate.kt
index 3b950d2..81193d9 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/delegate/PmActivityDelegate.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/delegate/PmActivityDelegate.kt
@@ -1,11 +1,38 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.delegate
-import android.app.*
-import android.os.*
-import me.dmdev.rxpm.*
-import me.dmdev.rxpm.base.*
-import me.dmdev.rxpm.delegate.PmActivityDelegate.RetainMode.*
-import me.dmdev.rxpm.navigation.*
+import android.app.Activity
+import android.os.Bundle
+import me.dmdev.rxpm.PmView
+import me.dmdev.rxpm.PresentationModel
+import me.dmdev.rxpm.base.PmActivity
+import me.dmdev.rxpm.delegate.PmActivityDelegate.RetainMode.CONFIGURATION_CHANGES
+import me.dmdev.rxpm.delegate.PmActivityDelegate.RetainMode.IS_FINISHING
+import me.dmdev.rxpm.navigation.ActivityNavigationMessageDispatcher
/**
* Delegate for the [Activity] that helps with creation and binding of
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/delegate/PmControllerDelegate.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/delegate/PmControllerDelegate.kt
index d86195e..08cf68c 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/delegate/PmControllerDelegate.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/delegate/PmControllerDelegate.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.delegate
import android.view.View
@@ -28,7 +53,7 @@ class PmControllerDelegate(pmController: C)
val presentationModel: PM get() = commonDelegate.presentationModel
init {
- pmController.addLifecycleListener(object : Controller.LifecycleListener {
+ pmController.addLifecycleListener(object : Controller.LifecycleListener() {
override fun preCreateView(controller: Controller) {
if (!created) {
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/delegate/PmFragmentDelegate.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/delegate/PmFragmentDelegate.kt
index 16178b5..607bc25 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/delegate/PmFragmentDelegate.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/delegate/PmFragmentDelegate.kt
@@ -1,11 +1,38 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.delegate
-import android.os.*
-import androidx.fragment.app.*
-import me.dmdev.rxpm.*
-import me.dmdev.rxpm.base.*
-import me.dmdev.rxpm.delegate.PmFragmentDelegate.RetainMode.*
-import me.dmdev.rxpm.navigation.*
+import android.os.Bundle
+import androidx.fragment.app.Fragment
+import me.dmdev.rxpm.PmView
+import me.dmdev.rxpm.PresentationModel
+import me.dmdev.rxpm.base.PmFragment
+import me.dmdev.rxpm.delegate.PmFragmentDelegate.RetainMode.CONFIGURATION_CHANGES
+import me.dmdev.rxpm.delegate.PmFragmentDelegate.RetainMode.SAVED_STATE
+import me.dmdev.rxpm.navigation.FragmentNavigationMessageDispatcher
/**
* Delegate for the [Fragment] that helps with creation and binding of
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/delegate/PmStore.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/delegate/PmStore.kt
index 47b89f5..c61bd30 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/delegate/PmStore.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/delegate/PmStore.kt
@@ -1,6 +1,31 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.delegate
-import me.dmdev.rxpm.*
+import me.dmdev.rxpm.PresentationModel
internal object PmStore {
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/ActivityNavigationMessageDispatcher.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/ActivityNavigationMessageDispatcher.kt
index c6fb3cd..2b166d9 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/ActivityNavigationMessageDispatcher.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/ActivityNavigationMessageDispatcher.kt
@@ -1,6 +1,31 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.navigation
-import android.app.*
+import android.app.Activity
class ActivityNavigationMessageDispatcher(
activity: Activity
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/ControllerNavigationMessageDispatcher.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/ControllerNavigationMessageDispatcher.kt
index 6614645..3ddd74e 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/ControllerNavigationMessageDispatcher.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/ControllerNavigationMessageDispatcher.kt
@@ -1,6 +1,31 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.navigation
-import com.bluelinelabs.conductor.*
+import com.bluelinelabs.conductor.Controller
class ControllerNavigationMessageDispatcher(
controller: Controller
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/FragmentNavigationMessageDispatcher.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/FragmentNavigationMessageDispatcher.kt
index 8fcb063..02847ae 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/FragmentNavigationMessageDispatcher.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/FragmentNavigationMessageDispatcher.kt
@@ -1,6 +1,31 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.navigation
-import androidx.fragment.app.*
+import androidx.fragment.app.Fragment
class FragmentNavigationMessageDispatcher(
fragment: Fragment
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/NavigationMessage.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/NavigationMessage.kt
index db5f742..164d0bc 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/NavigationMessage.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/NavigationMessage.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.navigation
/**
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/NavigationMessageDispatcher.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/NavigationMessageDispatcher.kt
index c2588ef..23653a8 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/NavigationMessageDispatcher.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/NavigationMessageDispatcher.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.navigation
abstract class NavigationMessageDispatcher(private val firstNode: Any) {
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/NavigationMessageHandler.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/NavigationMessageHandler.kt
index c811c48..9a31edf 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/NavigationMessageHandler.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/NavigationMessageHandler.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.navigation
/**
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/NavigationalPm.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/NavigationalPm.kt
index 0badb3f..b7b3b79 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/NavigationalPm.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/NavigationalPm.kt
@@ -1,6 +1,31 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.navigation
-import me.dmdev.rxpm.*
+import me.dmdev.rxpm.Command
interface NavigationalPm {
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/NotHandledNavigationMessageException.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/NotHandledNavigationMessageException.kt
index 3adff5a..354e928 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/NotHandledNavigationMessageException.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/navigation/NotHandledNavigationMessageException.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.navigation
/**
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/test/PmTestHelper.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/test/PmTestHelper.kt
index 98c8e62..976fc9c 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/test/PmTestHelper.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/test/PmTestHelper.kt
@@ -1,6 +1,32 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.test
-import me.dmdev.rxpm.*
+import me.dmdev.rxpm.Command
+import me.dmdev.rxpm.PresentationModel
import me.dmdev.rxpm.PresentationModel.Lifecycle.*
/**
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/util/BufferSingleValueWhileIdleOperator.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/util/BufferSingleValueWhileIdleOperator.kt
index b9e0687..3c317ec 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/util/BufferSingleValueWhileIdleOperator.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/util/BufferSingleValueWhileIdleOperator.kt
@@ -1,8 +1,36 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.util
-import io.reactivex.*
-import io.reactivex.disposables.*
-import io.reactivex.plugins.*
+import io.reactivex.Observable
+import io.reactivex.ObservableOperator
+import io.reactivex.Observer
+import io.reactivex.disposables.CompositeDisposable
+import io.reactivex.disposables.Disposable
+import io.reactivex.plugins.RxJavaPlugins
internal class BufferSingleValueWhileIdleOperator(
private val idleObserver: Observable
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/util/BufferWhileIdleOperator.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/util/BufferWhileIdleOperator.kt
index 4da04c3..4bf4e95 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/util/BufferWhileIdleOperator.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/util/BufferWhileIdleOperator.kt
@@ -1,10 +1,36 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.util
-import io.reactivex.*
import io.reactivex.Observable
+import io.reactivex.ObservableOperator
import io.reactivex.Observer
-import io.reactivex.disposables.*
-import io.reactivex.plugins.*
+import io.reactivex.disposables.CompositeDisposable
+import io.reactivex.disposables.Disposable
+import io.reactivex.plugins.RxJavaPlugins
import java.util.*
internal class BufferWhileIdleOperator(
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/validation/CheckValidator.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/validation/CheckValidator.kt
index d7f34df..42338bf 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/validation/CheckValidator.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/validation/CheckValidator.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.validation
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/validation/FormValidator.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/validation/FormValidator.kt
index 873454c..c1cb5cc 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/validation/FormValidator.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/validation/FormValidator.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.validation
import me.dmdev.rxpm.PresentationModel
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/validation/InputValidator.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/validation/InputValidator.kt
index 119c39d..c085bd4 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/validation/InputValidator.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/validation/InputValidator.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.validation
import me.dmdev.rxpm.PresentationModel
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/validation/Validator.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/validation/Validator.kt
index a7a2190..24ecffb 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/validation/Validator.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/validation/Validator.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.validation
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/widget/CheckControl.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/widget/CheckControl.kt
index 8366b88..bce147d 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/widget/CheckControl.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/widget/CheckControl.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.widget
import android.widget.*
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/widget/DialogControl.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/widget/DialogControl.kt
index ae804af..b2ac172 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/widget/DialogControl.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/widget/DialogControl.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.widget
import android.app.*
diff --git a/rxpm/src/main/kotlin/me/dmdev/rxpm/widget/InputControl.kt b/rxpm/src/main/kotlin/me/dmdev/rxpm/widget/InputControl.kt
index acf9b14..89a12cf 100644
--- a/rxpm/src/main/kotlin/me/dmdev/rxpm/widget/InputControl.kt
+++ b/rxpm/src/main/kotlin/me/dmdev/rxpm/widget/InputControl.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.widget
import android.text.SpannableString
diff --git a/rxpm/src/test/kotlin/me/dmdev/rxpm/ChildPresentationModelTest.kt b/rxpm/src/test/kotlin/me/dmdev/rxpm/ChildPresentationModelTest.kt
index 15277c5..1974f01 100644
--- a/rxpm/src/test/kotlin/me/dmdev/rxpm/ChildPresentationModelTest.kt
+++ b/rxpm/src/test/kotlin/me/dmdev/rxpm/ChildPresentationModelTest.kt
@@ -1,14 +1,41 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm
-import com.nhaarman.mockitokotlin2.*
-import io.reactivex.observers.*
-import me.dmdev.rxpm.PresentationModel.*
+import com.nhaarman.mockitokotlin2.spy
+import io.reactivex.observers.TestObserver
+import me.dmdev.rxpm.PresentationModel.Lifecycle
import me.dmdev.rxpm.PresentationModel.Lifecycle.*
-import me.dmdev.rxpm.navigation.*
-import me.dmdev.rxpm.util.*
-import org.junit.*
+import me.dmdev.rxpm.navigation.NavigationMessage
+import me.dmdev.rxpm.navigation.NavigationalPm
+import me.dmdev.rxpm.util.SchedulersRule
+import org.junit.Before
+import org.junit.Rule
import org.junit.Test
-import kotlin.test.*
+import kotlin.test.assertFailsWith
class ChildPresentationModelTest {
diff --git a/rxpm/src/test/kotlin/me/dmdev/rxpm/PmExtensionsTest.kt b/rxpm/src/test/kotlin/me/dmdev/rxpm/PmExtensionsTest.kt
index 0363e32..f8d9081 100644
--- a/rxpm/src/test/kotlin/me/dmdev/rxpm/PmExtensionsTest.kt
+++ b/rxpm/src/test/kotlin/me/dmdev/rxpm/PmExtensionsTest.kt
@@ -1,10 +1,41 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm
-import com.jakewharton.rxrelay2.*
-import io.reactivex.*
-import io.reactivex.observers.*
-import me.dmdev.rxpm.util.*
-import org.junit.*
+import com.jakewharton.rxrelay2.BehaviorRelay
+import com.jakewharton.rxrelay2.PublishRelay
+import io.reactivex.Completable
+import io.reactivex.Maybe
+import io.reactivex.Observable
+import io.reactivex.Single
+import io.reactivex.observers.TestObserver
+import me.dmdev.rxpm.util.SchedulersRule
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
class PmExtensionsTest {
diff --git a/rxpm/src/test/kotlin/me/dmdev/rxpm/PresentationModelTest.kt b/rxpm/src/test/kotlin/me/dmdev/rxpm/PresentationModelTest.kt
index e86fe85..219ed61 100644
--- a/rxpm/src/test/kotlin/me/dmdev/rxpm/PresentationModelTest.kt
+++ b/rxpm/src/test/kotlin/me/dmdev/rxpm/PresentationModelTest.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm
import com.nhaarman.mockitokotlin2.mock
diff --git a/rxpm/src/test/kotlin/me/dmdev/rxpm/StateTest.kt b/rxpm/src/test/kotlin/me/dmdev/rxpm/StateTest.kt
index fa37151..478dfcb 100644
--- a/rxpm/src/test/kotlin/me/dmdev/rxpm/StateTest.kt
+++ b/rxpm/src/test/kotlin/me/dmdev/rxpm/StateTest.kt
@@ -1,11 +1,38 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm
-import com.jakewharton.rxrelay2.*
-import com.nhaarman.mockitokotlin2.*
+import com.jakewharton.rxrelay2.PublishRelay
+import com.nhaarman.mockitokotlin2.spy
import me.dmdev.rxpm.PresentationModel.Lifecycle.*
-import me.dmdev.rxpm.test.*
-import me.dmdev.rxpm.util.*
-import org.junit.*
+import me.dmdev.rxpm.test.PmTestHelper
+import me.dmdev.rxpm.util.SchedulersRule
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
class StateTest {
diff --git a/rxpm/src/test/kotlin/me/dmdev/rxpm/delegate/CommonDelegateTest.kt b/rxpm/src/test/kotlin/me/dmdev/rxpm/delegate/CommonDelegateTest.kt
index c4188b5..982d24d 100644
--- a/rxpm/src/test/kotlin/me/dmdev/rxpm/delegate/CommonDelegateTest.kt
+++ b/rxpm/src/test/kotlin/me/dmdev/rxpm/delegate/CommonDelegateTest.kt
@@ -1,13 +1,40 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.delegate
import com.nhaarman.mockitokotlin2.*
-import io.reactivex.disposables.*
-import me.dmdev.rxpm.*
-import me.dmdev.rxpm.navigation.*
-import me.dmdev.rxpm.util.*
-import org.junit.*
+import io.reactivex.disposables.CompositeDisposable
+import me.dmdev.rxpm.PmView
+import me.dmdev.rxpm.PresentationModel
+import me.dmdev.rxpm.navigation.NavigationMessageDispatcher
+import me.dmdev.rxpm.util.SchedulersRule
+import org.junit.Before
+import org.junit.Rule
import org.junit.Test
-import kotlin.test.*
+import kotlin.test.assertEquals
class CommonDelegateTest {
diff --git a/rxpm/src/test/kotlin/me/dmdev/rxpm/delegate/PmActivityDelegateTest.kt b/rxpm/src/test/kotlin/me/dmdev/rxpm/delegate/PmActivityDelegateTest.kt
index 3597fd1..2b70ea1 100644
--- a/rxpm/src/test/kotlin/me/dmdev/rxpm/delegate/PmActivityDelegateTest.kt
+++ b/rxpm/src/test/kotlin/me/dmdev/rxpm/delegate/PmActivityDelegateTest.kt
@@ -1,15 +1,41 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.delegate
import com.nhaarman.mockitokotlin2.*
-import io.reactivex.disposables.*
-import me.dmdev.rxpm.*
+import io.reactivex.disposables.CompositeDisposable
+import me.dmdev.rxpm.PresentationModel
import me.dmdev.rxpm.PresentationModel.Lifecycle.*
-import me.dmdev.rxpm.base.*
-import me.dmdev.rxpm.delegate.PmActivityDelegate.*
-import me.dmdev.rxpm.util.*
-import org.junit.*
+import me.dmdev.rxpm.base.PmActivity
+import me.dmdev.rxpm.delegate.PmActivityDelegate.RetainMode
+import me.dmdev.rxpm.util.SchedulersRule
+import org.junit.Before
+import org.junit.Rule
import org.junit.Test
-import kotlin.test.*
+import kotlin.test.assertEquals
class PmActivityDelegateTest {
diff --git a/rxpm/src/test/kotlin/me/dmdev/rxpm/delegate/PmControllerDelegateTest.kt b/rxpm/src/test/kotlin/me/dmdev/rxpm/delegate/PmControllerDelegateTest.kt
index aceb0f5..77ade30 100644
--- a/rxpm/src/test/kotlin/me/dmdev/rxpm/delegate/PmControllerDelegateTest.kt
+++ b/rxpm/src/test/kotlin/me/dmdev/rxpm/delegate/PmControllerDelegateTest.kt
@@ -1,17 +1,46 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.delegate
-import android.view.*
-import com.bluelinelabs.conductor.*
-import com.nhaarman.mockitokotlin2.*
-import io.reactivex.disposables.*
-import me.dmdev.rxpm.*
+import android.view.View
+import com.bluelinelabs.conductor.Controller
+import com.nhaarman.mockitokotlin2.doReturn
+import com.nhaarman.mockitokotlin2.mock
+import com.nhaarman.mockitokotlin2.spy
+import com.nhaarman.mockitokotlin2.verify
+import io.reactivex.disposables.CompositeDisposable
+import me.dmdev.rxpm.PresentationModel
import me.dmdev.rxpm.PresentationModel.Lifecycle.*
-import me.dmdev.rxpm.base.*
-import me.dmdev.rxpm.util.*
-import org.junit.*
+import me.dmdev.rxpm.base.PmController
+import me.dmdev.rxpm.util.SchedulersRule
+import org.junit.Before
+import org.junit.Rule
import org.junit.Test
-import org.mockito.*
-import kotlin.test.*
+import org.mockito.ArgumentCaptor
+import kotlin.test.assertEquals
class PmControllerDelegateTest {
diff --git a/rxpm/src/test/kotlin/me/dmdev/rxpm/delegate/PmFragmentDelegateTest.kt b/rxpm/src/test/kotlin/me/dmdev/rxpm/delegate/PmFragmentDelegateTest.kt
index 42c1859..b08cfdd 100644
--- a/rxpm/src/test/kotlin/me/dmdev/rxpm/delegate/PmFragmentDelegateTest.kt
+++ b/rxpm/src/test/kotlin/me/dmdev/rxpm/delegate/PmFragmentDelegateTest.kt
@@ -1,16 +1,42 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.delegate
-import androidx.fragment.app.*
+import androidx.fragment.app.FragmentActivity
import com.nhaarman.mockitokotlin2.*
-import io.reactivex.disposables.*
-import me.dmdev.rxpm.*
+import io.reactivex.disposables.CompositeDisposable
+import me.dmdev.rxpm.PresentationModel
import me.dmdev.rxpm.PresentationModel.Lifecycle.*
-import me.dmdev.rxpm.base.*
-import me.dmdev.rxpm.delegate.PmFragmentDelegate.*
-import me.dmdev.rxpm.util.*
-import org.junit.*
+import me.dmdev.rxpm.base.PmFragment
+import me.dmdev.rxpm.delegate.PmFragmentDelegate.RetainMode
+import me.dmdev.rxpm.util.SchedulersRule
+import org.junit.Before
+import org.junit.Rule
import org.junit.Test
-import kotlin.test.*
+import kotlin.test.assertEquals
class PmFragmentDelegateTest {
diff --git a/rxpm/src/test/kotlin/me/dmdev/rxpm/navigation/NavigationMessageDispatcherTest.kt b/rxpm/src/test/kotlin/me/dmdev/rxpm/navigation/NavigationMessageDispatcherTest.kt
index 93cce4a..780f428 100644
--- a/rxpm/src/test/kotlin/me/dmdev/rxpm/navigation/NavigationMessageDispatcherTest.kt
+++ b/rxpm/src/test/kotlin/me/dmdev/rxpm/navigation/NavigationMessageDispatcherTest.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.navigation
import com.nhaarman.mockitokotlin2.*
diff --git a/rxpm/src/test/kotlin/me/dmdev/rxpm/test/PmTestHelperTest.kt b/rxpm/src/test/kotlin/me/dmdev/rxpm/test/PmTestHelperTest.kt
index 206c870..346a19c 100644
--- a/rxpm/src/test/kotlin/me/dmdev/rxpm/test/PmTestHelperTest.kt
+++ b/rxpm/src/test/kotlin/me/dmdev/rxpm/test/PmTestHelperTest.kt
@@ -1,13 +1,38 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.test
-import com.nhaarman.mockitokotlin2.*
-import io.reactivex.observers.*
-import me.dmdev.rxpm.*
+import com.nhaarman.mockitokotlin2.spy
+import io.reactivex.observers.TestObserver
+import me.dmdev.rxpm.PresentationModel
import me.dmdev.rxpm.PresentationModel.Lifecycle.*
-import me.dmdev.rxpm.test.PmTestHelper.*
-import org.junit.*
+import me.dmdev.rxpm.test.PmTestHelper.LifecycleSteps
+import org.junit.Before
import org.junit.Test
-import kotlin.test.*
+import kotlin.test.assertFailsWith
class PmTestHelperTest {
diff --git a/rxpm/src/test/kotlin/me/dmdev/rxpm/util/SchedulersRule.kt b/rxpm/src/test/kotlin/me/dmdev/rxpm/util/SchedulersRule.kt
index b3e66b9..a91d79f 100644
--- a/rxpm/src/test/kotlin/me/dmdev/rxpm/util/SchedulersRule.kt
+++ b/rxpm/src/test/kotlin/me/dmdev/rxpm/util/SchedulersRule.kt
@@ -1,9 +1,35 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.util
-import io.reactivex.android.plugins.*
-import io.reactivex.plugins.*
-import io.reactivex.schedulers.*
-import org.junit.rules.*
+import io.reactivex.android.plugins.RxAndroidPlugins
+import io.reactivex.plugins.RxJavaPlugins
+import io.reactivex.schedulers.Schedulers
+import io.reactivex.schedulers.TestScheduler
+import org.junit.rules.ExternalResource
class SchedulersRule(private val useTestScheduler: Boolean = false) : ExternalResource() {
diff --git a/rxpm/src/test/kotlin/me/dmdev/rxpm/validation/CheckValidatorTest.kt b/rxpm/src/test/kotlin/me/dmdev/rxpm/validation/CheckValidatorTest.kt
index a7ee518..1940446 100644
--- a/rxpm/src/test/kotlin/me/dmdev/rxpm/validation/CheckValidatorTest.kt
+++ b/rxpm/src/test/kotlin/me/dmdev/rxpm/validation/CheckValidatorTest.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.validation
import com.nhaarman.mockitokotlin2.mock
diff --git a/rxpm/src/test/kotlin/me/dmdev/rxpm/validation/FormValidatorTest.kt b/rxpm/src/test/kotlin/me/dmdev/rxpm/validation/FormValidatorTest.kt
index 5586959..20ecde7 100644
--- a/rxpm/src/test/kotlin/me/dmdev/rxpm/validation/FormValidatorTest.kt
+++ b/rxpm/src/test/kotlin/me/dmdev/rxpm/validation/FormValidatorTest.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.validation
import com.nhaarman.mockitokotlin2.doReturn
diff --git a/rxpm/src/test/kotlin/me/dmdev/rxpm/validation/InputValidatorTest.kt b/rxpm/src/test/kotlin/me/dmdev/rxpm/validation/InputValidatorTest.kt
index 6fe716c..7390f24 100644
--- a/rxpm/src/test/kotlin/me/dmdev/rxpm/validation/InputValidatorTest.kt
+++ b/rxpm/src/test/kotlin/me/dmdev/rxpm/validation/InputValidatorTest.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.validation
import com.nhaarman.mockitokotlin2.doReturn
diff --git a/rxpm/src/test/kotlin/me/dmdev/rxpm/widget/CheckControlTest.kt b/rxpm/src/test/kotlin/me/dmdev/rxpm/widget/CheckControlTest.kt
index a7fc1de..2213c2f 100644
--- a/rxpm/src/test/kotlin/me/dmdev/rxpm/widget/CheckControlTest.kt
+++ b/rxpm/src/test/kotlin/me/dmdev/rxpm/widget/CheckControlTest.kt
@@ -1,3 +1,28 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.widget
import me.dmdev.rxpm.PresentationModel
diff --git a/rxpm/src/test/kotlin/me/dmdev/rxpm/widget/DialogControlTest.kt b/rxpm/src/test/kotlin/me/dmdev/rxpm/widget/DialogControlTest.kt
index d874cfc..0fd5a66 100644
--- a/rxpm/src/test/kotlin/me/dmdev/rxpm/widget/DialogControlTest.kt
+++ b/rxpm/src/test/kotlin/me/dmdev/rxpm/widget/DialogControlTest.kt
@@ -1,8 +1,33 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.widget
import me.dmdev.rxpm.PresentationModel
-import me.dmdev.rxpm.widget.DialogControl.Display.Displayed
import me.dmdev.rxpm.widget.DialogControl.Display.Absent
+import me.dmdev.rxpm.widget.DialogControl.Display.Displayed
import org.junit.Before
import org.junit.Test
import kotlin.test.assertTrue
diff --git a/rxpm/src/test/kotlin/me/dmdev/rxpm/widget/InputControlTest.kt b/rxpm/src/test/kotlin/me/dmdev/rxpm/widget/InputControlTest.kt
index 4586088..dfd0040 100644
--- a/rxpm/src/test/kotlin/me/dmdev/rxpm/widget/InputControlTest.kt
+++ b/rxpm/src/test/kotlin/me/dmdev/rxpm/widget/InputControlTest.kt
@@ -1,9 +1,35 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2021 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
+ * and Vasili Chyrvon (vasili.chyrvon@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package me.dmdev.rxpm.widget
-import me.dmdev.rxpm.*
-import me.dmdev.rxpm.PresentationModel.Lifecycle.*
-import me.dmdev.rxpm.test.*
-import org.junit.*
+import me.dmdev.rxpm.PresentationModel
+import me.dmdev.rxpm.PresentationModel.Lifecycle.CREATED
+import me.dmdev.rxpm.test.PmTestHelper
+import org.junit.Before
+import org.junit.Test
class InputControlTest {