New way of reading configurations from file and deserializing

This commit is contained in:
2022-01-27 09:44:16 +01:00
parent 55f9bb666b
commit aabebc3e1e
8 changed files with 64 additions and 18 deletions

View File

@ -8,23 +8,15 @@ using Xunit;
namespace EATestProject
{
public class UnitTest1: IDisposable
public class UnitTest1
{
private readonly IWebDriver _driver;
private readonly IHomePage _homePage;
private readonly ICreateProductPage _createProductPage;
public UnitTest1(IDriverFixture driver, IHomePage homePage, ICreateProductPage createProductPage)
public UnitTest1( IHomePage homePage, ICreateProductPage createProductPage)
{
_homePage = homePage;
_createProductPage = createProductPage;
_driver = driver.Driver;
_driver.Navigate().GoToUrl(new Uri("http://localhost:33084"));
}
public void Dispose()
{
_driver.Quit();
}
[Theory,AutoData]
@ -43,5 +35,21 @@ namespace EATestProject
_homePage.CreateProduct();
_createProductPage.EnterProductDetails(product);
}
[Theory, AutoData]
public void Test3(Product product)
{
_homePage.CreateProduct();
_createProductPage.EnterProductDetails(product);
}
[Theory, AutoData]
public void Test4(Product product)
{
_homePage.CreateProduct();
_createProductPage.EnterProductDetails(product);
}
}
}