testing - C# Web Service Unit Tests -


i have following entity:

amount  currency -  string  value -  decimal 

i have wcf service uses entity , want make unit test class.

my problem want test invalid values value in entity , if try assign in in c#

amout m = new amout{currency = "eur", value = "aaaa"}  

gave error.

how can test situation?

for example can make following request in soapui:

<itc1:amount>   <itc2:currency>eur</itc2:currency>   <itc2:value>aaaaaa</itc2:value> </itc1:amount> 

and error service.

i want make same unit test.

i hope can me.

are looking :

    [testmethod()]     [expectedexception(typeof(knownexceptiontype))]     public void test()     {         //do throws knownexceptiontype      } 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -