Add project files.
This commit is contained in:
43
EATestProject/UnitTest1.cs
Normal file
43
EATestProject/UnitTest1.cs
Normal file
@ -0,0 +1,43 @@
|
||||
using EATestFramework.Driver;
|
||||
using EATestProject.Model;
|
||||
using EATestProject.Pages;
|
||||
using OpenQA.Selenium;
|
||||
using System;
|
||||
using Xunit;
|
||||
|
||||
namespace EATestProject
|
||||
{
|
||||
public class UnitTest1: IDisposable
|
||||
{
|
||||
private readonly IWebDriver _driver;
|
||||
private readonly IHomePage _homePage;
|
||||
private readonly ICreateProductPage _createProductPage;
|
||||
|
||||
public UnitTest1(IDriverFixture driver, IHomePage homePage, ICreateProductPage createProductPage)
|
||||
{
|
||||
_homePage = homePage;
|
||||
_createProductPage = createProductPage;
|
||||
_driver = driver.Driver;
|
||||
_driver.Navigate().GoToUrl(new Uri("http://localhost:33084"));
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_driver.Quit();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Test1()
|
||||
{
|
||||
|
||||
_homePage.CreateProduct();
|
||||
_createProductPage.EnterProductDetails(new Product
|
||||
{
|
||||
Name = "AutoProduct",
|
||||
Description = "AutoDescription",
|
||||
Price = 7675,
|
||||
ProductType = ProductType.PERIPHARALS
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user