Return values of user-created methods required to be strings?
Posted: Wed Jul 24, 2019 4:55 pm
Hello,
I'm trying to implement some database queries and validation of the returns into my testing modules. I'm creating my own methods and ideally would like to create methods that are modular and re-usable. It seems that when returning a value from a user-created method, the return value must be in the form of a string. This makes my task much more complicated and maybe impossible.
Am I looking at this the wrong way? If I go into the code and change the return values of my methods from strings to booleans or objects, is that going to break my tests when I eventually run them? My process for creating these methods is very slow as I'm a novice at C#, but I would hate to put a lot of time into building code that eventually just doesn't work.
Thanks in advance.
I'm trying to implement some database queries and validation of the returns into my testing modules. I'm creating my own methods and ideally would like to create methods that are modular and re-usable. It seems that when returning a value from a user-created method, the return value must be in the form of a string. This makes my task much more complicated and maybe impossible.
Am I looking at this the wrong way? If I go into the code and change the return values of my methods from strings to booleans or objects, is that going to break my tests when I eventually run them? My process for creating these methods is very slow as I'm a novice at C#, but I would hate to put a lot of time into building code that eventually just doesn't work.
Thanks in advance.