kpandidurai
7 years agoNew Contributor
Null Value testing
I have 3 input parameter in SOPA project. I want to test what happens when a null value is passed to one of the string.
Is there a way to pass a null string.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:lib="foo.com">
<soapenv:Header/>
<soapenv:Body>
<lib:foo>
<lib:fooA>?</lib:lib:fooA>
<lib:lib:fooB>?</lib:lib:fooB>
<!--Optional:-->
<lib:lib:fooC>If I leave it as empty it's going as string.Empty in the code. I want the value to be null.</lib:lib:fooC>
</lib:foo>
</soapenv:Body>
</soapenv:Envelope>
Tried below method - Did not work.
xsi:nil="true"
C#code behind:
[webmethod]
public bool foo(String a, String b, String c)
{
If( c == null)
I want this condition to be a success for the testing.
}
Thank you.