Add implementation of 'joda-time' for tests to avoid issue https://github.com/dlew/joda-time-android/issues/148
This commit is contained in:
parent
bf68537809
commit
7a37fb20b7
|
|
@ -1,41 +1,54 @@
|
||||||
apply from: "../android-configs/lib-config.gradle"
|
apply from: "../android-configs/lib-config.gradle"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
def coreVersion = '1.0.0'
|
||||||
|
def annotationVersion = '1.1.0'
|
||||||
|
def materialVersion = '1.2.0-rc01'
|
||||||
|
def jodaVersion = '2.10.2'
|
||||||
|
def junitVersion = '4.13.2'
|
||||||
|
|
||||||
implementation project(':kotlin-extensions')
|
implementation project(':kotlin-extensions')
|
||||||
implementation "androidx.core:core"
|
implementation "androidx.core:core"
|
||||||
implementation "androidx.annotation:annotation"
|
implementation "androidx.annotation:annotation"
|
||||||
implementation "com.google.android.material:material"
|
implementation "com.google.android.material:material"
|
||||||
implementation "net.danlew:android.joda"
|
implementation "net.danlew:android.joda"
|
||||||
implementation "junit:junit"
|
implementation "junit:junit"
|
||||||
|
testImplementation "joda-time:joda-time"
|
||||||
|
|
||||||
constraints {
|
constraints {
|
||||||
implementation("androidx.core:core") {
|
implementation("androidx.core:core") {
|
||||||
version {
|
version {
|
||||||
require '1.0.0'
|
require(coreVersion)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
implementation("androidx.annotation:annotation") {
|
implementation("androidx.annotation:annotation") {
|
||||||
version {
|
version {
|
||||||
require '1.1.0'
|
require(annotationVersion)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
implementation("com.google.android.material:material") {
|
implementation("com.google.android.material:material") {
|
||||||
version {
|
version {
|
||||||
require '1.2.0-rc01'
|
require(materialVersion)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
implementation("net.danlew:android.joda") {
|
implementation("net.danlew:android.joda") {
|
||||||
version {
|
version {
|
||||||
require '2.10.2'
|
require(jodaVersion)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
testImplementation("joda-time:joda-time") {
|
||||||
|
version {
|
||||||
|
require(jodaVersion)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
implementation("junit:junit") {
|
implementation("junit:junit") {
|
||||||
version {
|
version {
|
||||||
require '4.13.2'
|
require(junitVersion)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,10 @@
|
||||||
import org.joda.time.DateTime
|
import org.joda.time.DateTime
|
||||||
import org.joda.time.DateTimeZone
|
|
||||||
import org.joda.time.tz.UTCProvider
|
|
||||||
import org.junit.Assert
|
import org.junit.Assert
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import ru.touchin.roboswag.core.utils.DateFormatUtils
|
import ru.touchin.roboswag.core.utils.DateFormatUtils
|
||||||
|
|
||||||
class DateFormatUtilsTest {
|
class DateFormatUtilsTest {
|
||||||
|
|
||||||
init {
|
|
||||||
DateTimeZone.setProvider(UTCProvider())
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `Assert Date format parsing`() {
|
fun `Assert Date format parsing`() {
|
||||||
val dateTime = DateFormatUtils.fromString(
|
val dateTime = DateFormatUtils.fromString(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue