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

Update CsvFileReader.kt #83

Merged
merged 2 commits into from
Apr 15, 2021
Merged

Update CsvFileReader.kt #83

merged 2 commits into from
Apr 15, 2021

Conversation

mykhaylo-
Copy link
Contributor

Updated CsvFileReader to use header row number of fields as a reference for mismatched rows check

Updated CsvFileReader to use header row number of fields as a reference for mismatched rows check
@codecov
Copy link

codecov bot commented Apr 12, 2021

Codecov Report

Merging #83 (c4c6616) into master (f4637eb) will decrease coverage by 0.09%.
The diff coverage is 66.66%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #83      +/-   ##
============================================
- Coverage     82.71%   82.61%   -0.10%     
- Complexity      144      145       +1     
============================================
  Files            21       21              
  Lines           972      978       +6     
  Branches        197      198       +1     
============================================
+ Hits            804      808       +4     
- Misses           16       17       +1     
- Partials        152      153       +1     
Impacted Files Coverage Δ Complexity Δ
...thub/doyaaaaaken/kotlincsv/client/CsvReaderTest.kt 75.87% <60.00%> (-0.41%) 1.00 <0.00> (ø)
...thub/doyaaaaaken/kotlincsv/client/CsvFileReader.kt 82.92% <71.42%> (+0.42%) 17.00 <2.00> (+1.00)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f4637eb...c4c6616. Read the comment docs.

@doyaaaaaken
Copy link
Collaborator

refs #82

@doyaaaaaken
Copy link
Collaborator

@mykhaylo-
Thank you.
Looks good to me, but please add a test code.

Write it under this line.
Your test code might look like the code I wrote below

//example test code (maybe it doen't work)
"number of fields in a row has to be based on the header #82" {
            val data = "1,2,3\na,b\nx,y,z"
            val exception = shouldThrow<CSVFieldNumDifferentException> {
                csvReader().readAllWithHeader(data)
            }
            exception.fieldNum shouldBe 3
}

@doyaaaaaken doyaaaaaken merged commit 4d92377 into jsoizo:master Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants