public void TC22_Selenium_Castor_SampleOrder_SampleReportgeneration() { if (testResult["TC21_Selenium_Castor_SampleOrder_LabTest"] == "Passed") { LeanFtTest1 Testpahse1 = new LeanFtTest1(); try { Testpahse1.TC22_Selenium_Castor_SampleOrder_SampleReportgeneration(); } finally { Testpahse1.TearDown(); } } else { Reporter.ReportEvent(TestContext.CurrentContext.Test.MethodName, "due to fail/Skip in test TC21_Selenium_Castor_SampleOrder_LabTest and current test depends on that", Status.Warning); Assert.Ignore(); } }