I am trying to add a testcase name as a folder name. I am adding it in Teardown method to detect first whether to testcase passed or fail then accordingly it adds Folder in Pass or Fail Folder which already exist.
[Test]
public void TestCase12345()
{
string Name = methodBase.Name;
teardown(Name);
}
[TearDown]
public void teardown(string testcase)
{
if (TestContext.CurrentContext.Result.Status == TestStatus.Passed)
{
string sourcepath = @"sourcepath";
string timestamp = DateTime.Now.ToString("yy-MM-dd hh-mm");
string destpath = (@"destinationlocation" + "Test Case - " + testcase + " " + timestamp);
...
}
Error:
Invalid signature for SetUp or TearDown method: teardown
What am I missing over here?