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"
|
||||
|
||||
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 "androidx.core:core"
|
||||
implementation "androidx.annotation:annotation"
|
||||
implementation "com.google.android.material:material"
|
||||
implementation "net.danlew:android.joda"
|
||||
implementation "junit:junit"
|
||||
testImplementation "joda-time:joda-time"
|
||||
|
||||
constraints {
|
||||
implementation("androidx.core:core") {
|
||||
version {
|
||||
require '1.0.0'
|
||||
require(coreVersion)
|
||||
}
|
||||
}
|
||||
|
||||
implementation("androidx.annotation:annotation") {
|
||||
version {
|
||||
require '1.1.0'
|
||||
require(annotationVersion)
|
||||
}
|
||||
}
|
||||
|
||||
implementation("com.google.android.material:material") {
|
||||
version {
|
||||
require '1.2.0-rc01'
|
||||
require(materialVersion)
|
||||
}
|
||||
}
|
||||
|
||||
implementation("net.danlew:android.joda") {
|
||||
version {
|
||||
require '2.10.2'
|
||||
require(jodaVersion)
|
||||
}
|
||||
}
|
||||
|
||||
testImplementation("joda-time:joda-time") {
|
||||
version {
|
||||
require(jodaVersion)
|
||||
}
|
||||
}
|
||||
|
||||
implementation("junit:junit") {
|
||||
version {
|
||||
require '4.13.2'
|
||||
require(junitVersion)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,10 @@
|
|||
import org.joda.time.DateTime
|
||||
import org.joda.time.DateTimeZone
|
||||
import org.joda.time.tz.UTCProvider
|
||||
import org.junit.Assert
|
||||
import org.junit.Test
|
||||
import ru.touchin.roboswag.core.utils.DateFormatUtils
|
||||
|
||||
class DateFormatUtilsTest {
|
||||
|
||||
init {
|
||||
DateTimeZone.setProvider(UTCProvider())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Assert Date format parsing`() {
|
||||
val dateTime = DateFormatUtils.fromString(
|
||||
|
|
|
|||
Loading…
Reference in New Issue