I would like to test this method using UnitTest, but I have no clue how to approach to this return type even the method does not make sens or anything
public Result ChangeVoucherStatus(long[] voucherIDs, GenericStatus newStatus, Context context)
{
...
return new Result(true, resMsg);
}
I am using Visual Studio 2012 and NUnit test adapter Any suggestions?
I have tested the void methods but this scared me.
Resultobject) and then make sure it looks right (eg that your boolean is correct given your inputs or that your mresMsg says the same thing). If the method doesn't make sense then you might need to sort that out before worrying about testing it...Object Resultand get out of that 2 thingsbooleanandmessageis that correct? *and method does not make sens here, here in this questionResultobject that you've created manually or you may have to test key properties individually. Essentially it boils down to if you know the input you should know the output so you can test the output is what it should be.