public void TestExampleFive() { ExpectedOutput output = new ExpectedOutput(); output.Name = "Nikki"; output.Word = "one dollar and one cent"; var expectedJson = new JavaScriptSerializer().Serialize(output); ServiceReference.NumericValueToWordSoapClient client = new ServiceReference.NumericValueToWordSoapClient(); string response = client.ConvertNumericValueToWord("1", "Nikki", "01"); Assert.AreEqual(expectedJson, response); }
public void TestExampleTwo() { ExpectedOutput output = new ExpectedOutput(); output.Name = "Nikki"; output.Word = "one hundred and twenty-three dollars and forty-five cents"; var expectedJson = new JavaScriptSerializer().Serialize(output); ServiceReference.NumericValueToWordSoapClient client = new ServiceReference.NumericValueToWordSoapClient(); string response = client.ConvertNumericValueToWord("123", "Nikki", "45"); Assert.AreEqual(expectedJson, response); }
public void TestExampleSeven() { ExpectedOutput output = new ExpectedOutput(); output.Name = "Nikki"; output.Word = "two dollars and twenty cents"; var expectedJson = new JavaScriptSerializer().Serialize(output); ServiceReference.NumericValueToWordSoapClient client = new ServiceReference.NumericValueToWordSoapClient(); string response = client.ConvertNumericValueToWord("2", "Nikki", "2"); Assert.AreEqual(expectedJson, response); }
public void TestExampleOne() { //Expected Output ExpectedOutput output = new ExpectedOutput(); output.Name = "nikki"; output.Word = "twenty-two dollars and twenty-two cents"; var expectedJson = new JavaScriptSerializer().Serialize(output); //Call Service and Get Json Response ServiceReference.NumericValueToWordSoapClient client = new ServiceReference.NumericValueToWordSoapClient(); string response = client.ConvertNumericValueToWord("22", "nikki", "22"); //Compare ExpectedJson and WebService JsonResponse Assert.AreEqual(expectedJson, response); }