Skip to content
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

Create tests for WriteGDF.scala #55

Closed
ruebot opened this issue Oct 2, 2017 · 8 comments
Closed

Create tests for WriteGDF.scala #55

ruebot opened this issue Oct 2, 2017 · 8 comments
Assignees

Comments

@ruebot
Copy link
Member

ruebot commented Oct 2, 2017

WriteGDF.scala has no test coverage. We need to create tests for it.

@ruebot ruebot added the tests label Oct 2, 2017
@greebie greebie self-assigned this Oct 4, 2017
@greebie greebie closed this as completed Oct 4, 2017
@greebie greebie reopened this Oct 4, 2017
@ruebot
Copy link
Member Author

ruebot commented Oct 5, 2017

We have 90% coverage on this one. We should cover this conditional which was not covered in #84:
https://codecov.io/gh/archivesunleashed/aut/src/master/src/main/scala/io/archivesunleashed/spark/matchbox/WriteGDF.scala#L38

@greebie
Copy link
Contributor

greebie commented Oct 5, 2017

Not sure how to cover the results here. Either way, the function will return a Unit, (), so assertion will not work. Nor can I test for the function not creating a file.

Would it be better if the function returned an Option or a Bool?

@greebie greebie added the wontfix label Oct 6, 2017
ruebot pushed a commit that referenced this issue Oct 6, 2017
…#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.
@greebie
Copy link
Contributor

greebie commented Oct 6, 2017

I think the solution for full coverage here is to ask the function to return a value on failure vs true. This can be an option or a Bool. (probably Bool).

@ruebot
Copy link
Member Author

ruebot commented Oct 6, 2017

Cool. If you want to toss in a PR, let's see how it goes.

@greebie
Copy link
Contributor

greebie commented Oct 6, 2017

It'll probably blow up some other test, but we'll see. :)

@ruebot
Copy link
Member Author

ruebot commented Oct 6, 2017

Breaking shit, and blowing stuff up is how I learn 😃

@greebie
Copy link
Contributor

greebie commented Oct 6, 2017

🗡 💩 💥 💩 💩

ruebot pushed a commit that referenced this issue Oct 17, 2017
* Minor fix to improve coverage.

* Add ExtractBoilerpipe test.
Improve ExtractBoilerpipe to avoid null pointer exception on null call.
Add placeholders to ExtractEntities for further exploration.

* Revise Write GDF to return a True on success and False on failure.
Improve coverage on ExtractBoilerPipeText

* Change test for empty path from if "" to if isEmpty().
@ruebot
Copy link
Member Author

ruebot commented Oct 17, 2017

Resolved with: 64a4851

@ruebot ruebot closed this as completed Oct 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants