Hi Martina,
I doubled (manually) each double quote. That worked, running this test now again to confirm. UPDATE. Yes, test ran successfully.
I checked this
https://stackoverflow.com/questions/3458046/how-to-include-quotes-in-a-stringI think there is something new in C# to allow long texts, need to search a bit harder.
>Hi Naomi,
>
>I don't programming in c# but, it's time to escape char.
>
>
> string expected = @"<ERR>0</ERR><STATUSCODE>0</STATUSCODE><MSG>[
> {
> \"descrip_a\": \"2 Hour Group Telemark \",
>....
>
> MartinaJ
>
>>Hi everybody,
>>
>>I'm testing the JSON output I'm adding to our application. When I debug my test and then look at Text Output in the Visual Studio, I get this
>>
>> string expected = @"<ERR>0</ERR><STATUSCODE>0</STATUSCODE><MSG>[
>> {
>> "descrip_a": "2 Hour Group Telemark ",
>> "department": "LSSNS-GRP ",
>> "category": "TELEMARK ",
>> "item": "2HOUR ",
>> "span": 120,
>> "descrip_b": "GRP Telemark $ ",
>> "layer": 5,
>> "lsn_cat": "G"
>> }
>>]</MSG>";
>>
>>
>>The problem is - how should I actually put this string in C# code? Since I have double quotes in it, it doesn't let me.
>>
>>Thanks in advance.
If it's not broken, fix it until it is.
My Blog