Platform (jvm, jdk8, js, android): jdk8
expect(LocalDate.now).month.toBe(10)
expect(LocalDate.now).month {
isLessThan(11)
...
}
expect(LocalDateTime.now).month.toBe(10)
expect(LocalDateTime.now).month {
isLessThan(11)
...
}
expect(ZonedDateTime.now).month.toBe(10)
expect(ZonedDateTime.now).month {
isLessThan(2020)
...
}
//instead of
expect(LocaleDate.now).feature { f(it::month) }.toBe(10)
expect(LocaleDate.now).feature({ f(it::month) }) {
isLessThan(11)
...
}
...
Following the things you need to do (same same but different for LocaleDateTime and ZonedDateTime):
domain
month (see CollectionAssertions.size as a guideline)lib
ExpectImpl.feature.manual (see collectionsAssertions -> size as a guideline)MONTH("month") to DescriptionDateTimeLikeAssertion for en_GBMONTH("Monat") to DescriptionDateTimeLikeAssertion for de_CHapi (fluent-en_GB/extensions/jdk8)
assertionCreator-lambda and returns ExpectI'll work on this if you would like to take this issue over.Hi @robstoll I'll work on this
@ShradhaSangtani please rebase on master (in case you haven't done this before: https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request). The shortcut for year was added by now (you might want to have a look at the pull request #182 in case you are stuck).
@robstoll Sure thanks I have rebased the project. I have few doubts though. I have setup the project on intellij. I am able to run the atrium mocha task which runs all the tests in the project. But i am unable to run the individual tests. Also tried using kotlinTest plugin to run a particular test. Can you help me with this?
Mocha is only used to run the JS tests, you won't need those for your task. Have a look at Your first code contribution tests are written with Spek. And as written there, you need the Spek Framework by Spek Team plugin for intellij to run the specs. Does that already help enough?
You can also run test for an individual module with gradle, e.g. ./gr :atrium-api-core-jvm:build builds the atrium-api-core-jvm module which includes running its tests.
@robstoll Yeah I am able to run spek tests now. Thanks :)
@robstoll Raised PR . Please have a look.
implemented via d80bb63