public void BTA219_CDIS_UpdateMember_UpdateEmailId_Positive() { testCase = new TestCase(TestContext.TestName); listOfTestSteps = new List <TestStep>(); testStep = new TestStep(); String stepName = ""; Common common = new Common(this.DriverContext); CDIS_Service_Methods cdis_Service_Method = new CDIS_Service_Methods(common); try { testStep = TestStepHelper.StartTestStep(testStep); stepName = "Adding member with CDIS service"; Member output = cdis_Service_Method.AddSoapMember(common.AddMemberWithAllFields()); testStep.SetOutput("IpCode: " + output.IpCode + " , Name: " + output.FirstName + " and members email is : \"[" + output.PrimaryEmailAddress + "]\""); Logger.Info("IpCode: " + output.IpCode + ", Name: " + output.FirstName); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("API")); listOfTestSteps.Add(testStep); testStep = TestStepHelper.StartTestStep(testStep); stepName = "Updating Member email through UpdateMember method"; output.PrimaryEmailAddress = output.FirstName + "@updatemethod.com"; Member updatedMember = cdis_Service_Method.UpdateMemberGeneral(output); testStep.SetOutput("The members primary emailID is updated to : " + updatedMember.PrimaryEmailAddress); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("API")); listOfTestSteps.Add(testStep); testStep = TestStepHelper.StartTestStep(testStep); stepName = "validating the member emailid from database"; string dbresponse = DatabaseUtility.GetEmailIDfromDBSOAP(updatedMember.IpCode + ""); Assert.AreEqual(output.PrimaryEmailAddress, dbresponse, "Expected value is" + output.PrimaryEmailAddress + "Actual value is" + dbresponse); testStep.SetOutput("EmailId value from db is :" + dbresponse + " and EmailID updated from udpateMethod is :" + output.PrimaryEmailAddress); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("API")); listOfTestSteps.Add(testStep); testCase.SetStatus(true); } catch (Exception e) { testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, false, DriverContext.SendScreenshotImageContent("API")); listOfTestSteps.Add(testStep); testCase.SetStatus(false); testCase.SetErrorMessage(e.Message); Assert.Fail(e.Message); } finally { testCase.SetTestCaseSteps(listOfTestSteps); testCase.SetEndTime(new StringHelper().GetFormattedDateTimeNow()); listOfTestCases.Add(testCase); } }