junit - How to unit test this? -
I have recently been playing with .NET speech synthesis.
And I have a method that takes you to the string and creates a .wav file out of that string. But how can I test this method?
I feel as if this situation is one where unit testing can not help you, am I right?
What do you want to test here?
Does the .NET SpeechSynthesizer write API wave file or output some code to your code that writes wave file?
This test is similar to checking any other dependencies. First of all it is separate (thin and fake cover stands around the Net Speech Synthetizer API). Then validate your code which you feel it should be given and work on any returned data as it should be working. Leave someone else (the creators of the API) test the NIT Speech Synthesiser API.
The test of the cover is a transfer test (if you stop it from doing it in TDD Manor your talk), and you should be quite loose on what you are valid ("Speak (string) output file to grow Causes "). But then you do not need to validate API functions.
Comments
Post a Comment