-
-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#482 accept date as string for chronozoneddatetime #625
#482 accept date as string for chronozoneddatetime #625
Conversation
…toll#482-accept-date-as-string-for-chronozoneddatetime
@robstoll I have one issues that I can't explain myself. In |
Hard to guess without checking out your code. Will do that later on. Note that Intellij has a few bugs when it comes to JVM only. Does gradle output the same error? Are the functions you use all available in jdk8? |
Gradle does output the same error. I checked the functions, they are all available in jdk8. Maybe I am missing something |
Maybe the problem is that you used Kotlin 1.4 in your worksheet whereas we still use Kotlin 1.2 in Atrium. Kotlin 1.4 improved the support for Java's SAM-interface interoperability. You can solve it as follows:
|
…either a ZonedDateTime, LocalDateTime or LocalDate object
@robstoll That was it, thank you 😄 Now some tests are failing because the How should I handle this case? |
…lit("Z") last element is an empty string
…eTime should be used. In every other case the custom DateTimeFormatter is used.
…bling the string comparison to succeed in any case
Ok I tried to implement a solution. |
...gic-jvm/src/main/kotlin/ch/tutteli/atrium/logic/impl/DefaultChronoZonedDateTimeAssertions.kt
Outdated
Show resolved
Hide resolved
...gic-jvm/src/main/kotlin/ch/tutteli/atrium/logic/impl/DefaultChronoZonedDateTimeAssertions.kt
Outdated
Show resolved
Hide resolved
...gic-jvm/src/main/kotlin/ch/tutteli/atrium/logic/impl/DefaultChronoZonedDateTimeAssertions.kt
Outdated
Show resolved
Hide resolved
/** | ||
* Expects that the subject of the assertion (a [ChronoZonedDateTime]) | ||
* is before or equals the [expected] [ChronoZonedDateTime] given as [String]. | ||
* Check [ch.tutteli.atrium.logic.impl.DefaultChronoZonedDateTimeAssertions.parseZonedDateTime] to see which values are allowed for [expected]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should write the supported formats here. I doubt someone wants to go and have a look at an internal method.
Also, we can then write that ZoneDesignator like [Europe/Zurich] is only supported experimentally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work in api-fluent, can you please copy it to api-infix as well
.../main/kotlin/ch/tutteli/atrium/specs/integration/ChronoZonedDateTimeAsStringAssertionSpec.kt
Outdated
Show resolved
Hide resolved
…s of our custom ZonedDateTime parsing method. Furthermore add some examples to show which input values are generally accepted.
…toll#482-accept-date-as-string-for-chronozoneddatetime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last detail and we are good to merge
/** | ||
* Expects that the subject of the assertion (a [ChronoZonedDateTime]) | ||
* is before or equals the [expected] [ChronoZonedDateTime] given as [String]. | ||
* Check [ch.tutteli.atrium.logic.impl.DefaultChronoZonedDateTimeAssertions.parseZonedDateTime] to see which values are allowed for [expected]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work in api-fluent, can you please copy it to api-infix as well
# This is the 1st commit message: robstoll#630 add Path.isRelative method # This is the commit message robstoll#2: robstoll#482 accept date as string for chronozoneddatetime (robstoll#625)
# This is the 1st commit message: robstoll#630 add Path.isRelative method # This is the commit message robstoll#2: robstoll#482 accept date as string for chronozoneddatetime (robstoll#625)
Let's go
I confirm that I have read the Contributor Agreements v1.0, agree to be bound on them and confirm that my contribution is compliant.