public void EndTest() { ScreenshotHandler.MakeScreenshot(TestContext.CurrentContext, driver); driver.Close(); foreach (var brand in context.Brands.Where(x => x.BrandName == TestSettings.brandName)) { context.Brands.Remove(brand); } context.SaveChanges(); context.Dispose(); }
public void EndTest() { ScreenshotHandler.MakeScreenshot(TestContext.CurrentContext, driver); driver.Close(); foreach (var monitor in context.Monitors.Where(x => x.Model == TestSettings.monitorModel)) { context.Monitors.Remove(monitor); } foreach (var brand in context.Brands.Where(x => x.BrandName == TestSettings.brandName)) { context.Brands.Remove(brand); } context.SaveChanges(); context.Dispose(); helper.DeleteDirectory(Directory.GetParent(helper.GetPhysicalImageFolderLocation(TestSettings.brandName, TestSettings.monitorModel)).FullName); }