AlexPoint / SubtitlesParser

Multi formats subtitles parser in C#
MIT License
134 stars 40 forks source link

Add a new xunit project for tests #22

Closed gldraphael closed 5 years ago

gldraphael commented 5 years ago

Related: https://github.com/AlexPoint/SubtitlesParser/issues/16

AlexPoint commented 5 years ago

The only unit test added is empty. Did you forget to commit your tests?

gldraphael commented 5 years ago

I'll continue working on this in the weekend.

On Thu, Oct 10, 2019, 19:04 Alex notifications@github.com wrote:

The only unit test added is empty. Did you forget to commit your tests?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/AlexPoint/SubtitlesParser/pull/22?email_source=notifications&email_token=ACSLJZP4VB4DIXPIOQSVP2TQN4VOTA5CNFSM4I7BPCU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA4KV7A#issuecomment-540584700, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSLJZJECXZMMQSE5ZAYW4DQN4VOTANCNFSM4I7BPCUQ .

gldraphael commented 5 years ago

I've added tests. You can run them in Visual Studio's Text Explorer Extension, or on the commandline. I've tested with .NET Core 3.0.100.

image

I've made copies of the subtitle files being tested in the console project and put the valid and invalid file in subfolders. What I have not done is check for things like corrupted %, number of items, etc. These will need to be done on a file-by-file basis.

AlexPoint commented 5 years ago

Thank you for this PR. It's only two tests but that just the beginning... ;)

gldraphael commented 5 years ago

True that. But if we have a good test-sample size, I think this should be sufficient to give enough confidence over the parsing logic.

Now that we have tests, could consider setting up CI BTW :)

gldraphael commented 5 years ago

image