Add unit tests for util classes (DateTimeUtils, TimeZoneUtils)#348
Add unit tests for util classes (DateTimeUtils, TimeZoneUtils)#348serious6 merged 1 commit intoOfficeDev:masterfrom vbauer:ut-for-uc
Conversation
|
Hi @vbauer, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution! TTYL, AZPRBOT; |
|
looks good 👍 |
|
Looks good. Would be nice to do some non-UTC tests and potentially support case-insensitive lookups in the timezone hashmap. |
|
It looks like I'll add some positive and negative tests for lookup. |
|
PR was updated. |
There was a problem hiding this comment.
Does it make sense to keep the ones that are out of date? When are these useful?
There was a problem hiding this comment.
@vboctor I don't know (it isn't my code), I've just formatted length of this line (it was too long).
|
Thx for CR, PR was updated. |
There was a problem hiding this comment.
I found that it depends on env. setup. Is it OK?
There was a problem hiding this comment.
shouldnt this be a little against design of unit-test to assert one or another?
There was a problem hiding this comment.
Yes, I also don't like this, but as I wrote method TimeZone.getTimeZone depends on tzdata (in JVM):
- If you have timezone "Antarctica/Troll" in tzdata, than you'll get "null".
- If you haven't it, than you'll have "UTC".
Do you have any idea how to improve it?
There was a problem hiding this comment.
@vbauer wouldnt it be a solution to the problem if we just pick a timezone that def. will be in tzdata? Or is this just random? And why do you think this timezone will not be referenced on travis? If this can cause problems please add a comment to the test. This could ref. to tzdata-versions for instance.
|
PR was update. I think it will be enough to have test with "Africa/Abidjan" timezone. |
Add unit tests for util classes (DateTimeUtils, TimeZoneUtils) and minor improvements
|
@vbauer thanks for your contribution |
No description provided.