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

Improve ExtractDate.scala test coverage #64

Open
ruebot opened this Issue Oct 2, 2017 · 8 comments

Comments

3 participants
@ruebot
Member

ruebot commented Oct 2, 2017

ExtractDate.scala test coverage can be improved.

@ruebot ruebot added the tests label Oct 2, 2017

@ruebot ruebot added this to To Do in Test coverage Oct 2, 2017

@greebie

This comment has been minimized.

Show comment
Hide comment
@greebie

greebie Oct 5, 2017

Contributor

Not sure what's wrong here. Looks covered to me.

Contributor

greebie commented Oct 5, 2017

Not sure what's wrong here. Looks covered to me.

@ruebot

This comment has been minimized.

Show comment
Hide comment
@ruebot

ruebot Oct 5, 2017

Member

The yellow.

Member

ruebot commented Oct 5, 2017

The yellow.

@ianmilligan1

This comment has been minimized.

Show comment
Hide comment
@ianmilligan1

ianmilligan1 Oct 5, 2017

Member

Some example use of ExtractDate.scala is here, if that helps.

Member

ianmilligan1 commented Oct 5, 2017

Some example use of ExtractDate.scala is here, if that helps.

@greebie

This comment has been minimized.

Show comment
Hide comment
@greebie

greebie Oct 5, 2017

Contributor

Yup, I know. But I don't see where I can improve. All the yellow parts have test cases in https://github.com/archivesunleashed/aut/blob/3fb85e401aac1f2e6eef4ca1627a3f3428a2d8c3/src/test/scala/io/archivesunleashed/spark/matchbox/ExtractDateTest.scala

as far as I can see.

Contributor

greebie commented Oct 5, 2017

Yup, I know. But I don't see where I can improve. All the yellow parts have test cases in https://github.com/archivesunleashed/aut/blob/3fb85e401aac1f2e6eef4ca1627a3f3428a2d8c3/src/test/scala/io/archivesunleashed/spark/matchbox/ExtractDateTest.scala

as far as I can see.

@ruebot

This comment has been minimized.

Show comment
Hide comment
@ruebot

ruebot Oct 5, 2017

Member

It means they are partials covered, so there something off about

assert(ExtractDate("20151204", YYYY) == "2015")
assert(ExtractDate("20151204", MM) == "12")
assert(ExtractDate("20151204", DD) == "04")
assert(ExtractDate("20151204", YYYYMM) == "201512")
assert(ExtractDate("20151204", YYYYMMDD) == "20151204")
assert(ExtractDate(null, YYYYMMDD) == null)
. It might be that they are testing with ExtractDate and the current code uses fullDate.substring.

Member

ruebot commented Oct 5, 2017

It means they are partials covered, so there something off about

assert(ExtractDate("20151204", YYYY) == "2015")
assert(ExtractDate("20151204", MM) == "12")
assert(ExtractDate("20151204", DD) == "04")
assert(ExtractDate("20151204", YYYYMM) == "201512")
assert(ExtractDate("20151204", YYYYMMDD) == "20151204")
assert(ExtractDate(null, YYYYMMDD) == null)
. It might be that they are testing with ExtractDate and the current code uses fullDate.substring.

@greebie

This comment has been minimized.

Show comment
Hide comment
@greebie

greebie Oct 5, 2017

Contributor

okay - I'll try assert(ExtractDate("20151204", YYYY) == "20151204".substring(0,4)) and see if that helps.

Contributor

greebie commented Oct 5, 2017

okay - I'll try assert(ExtractDate("20151204", YYYY) == "20151204".substring(0,4)) and see if that helps.

ruebot added a commit that referenced this issue Oct 6, 2017

Improve Test Coverage for #55, #56, #57, #58, #59, #60, #61, #62, #63,
…#64 & #66 (#87)

* Add tests for remove Tuples, CreateGDF and RemoveHTML

* Add RemoveHttpHeader test.

* Add license header to tests.

* Issues #56, #57, #58, #59, #61, #62

* resolves Issue #85 (JsonUtil)

* Fix issue # 64 (ExtractDate coverage)

* Resolve Issue #63 (Extract Domain coverage)

* Fix error caused by repeated test names.
@ruebot

This comment has been minimized.

Show comment
Hide comment
@ruebot

ruebot Dec 7, 2017

Member

Fully resolved with: d2da97f

Member

ruebot commented Dec 7, 2017

Fully resolved with: d2da97f

@ruebot ruebot closed this Dec 7, 2017

@ruebot ruebot moved this from To Do to Done in Test coverage Dec 7, 2017

@ruebot ruebot reopened this Aug 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment