Completed with Autofixture and autodata

This commit is contained in:
2022-01-26 21:23:25 +01:00
parent 021ac9e86b
commit 55f9bb666b
2 changed files with 15 additions and 9 deletions

View File

@ -1,3 +1,4 @@
using AutoFixture.Xunit2;
using EATestFramework.Driver;
using EATestProject.Model;
using EATestProject.Pages;
@ -26,18 +27,21 @@ namespace EATestProject
_driver.Quit();
}
[Fact]
public void Test1()
[Theory,AutoData]
public void Test1(Product product)
{
_homePage.CreateProduct();
_createProductPage.EnterProductDetails(new Product
{
Name = "AutoProduct",
Description = "AutoDescription",
Price = 7675,
ProductType = ProductType.PERIPHARALS
});
_createProductPage.EnterProductDetails(product);
}
[Theory, AutoData]
public void Test2(Product product)
{
_homePage.CreateProduct();
_createProductPage.EnterProductDetails(product);
}
}
}