Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save angelovstanton/1dc98c554fcae46d7691 to your computer and use it in GitHub Desktop.
Save angelovstanton/1dc98c554fcae46d7691 to your computer and use it in GitHub Desktop.
[TestClass]
public class OnlineStorePurchase_PurchaseStrategy_Tests
{
[TestInitialize]
public void SetupTest()
{
Driver.StartBrowser();
}
[TestCleanup]
public void TeardownTest()
{
Driver.StopBrowser();
}
[TestMethod]
public void Purchase_SeleniumTestingToolsCookbook()
{
string itemUrl = "/Selenium-Testing-Cookbook-Gundecha-Unmesh/dp/1849515743";
string itemPrice = "40.49";
ClientPurchaseInfo clientPurchaseInfo = new ClientPurchaseInfo(
new ClientAddressInfo()
{
FullName = "John Smith",
Country = "United States",
Address1 = "950 Avenue of the Americas",
State = "New York",
City = "New York City",
Zip = "10001-2121",
Phone = "00164644885569"
})
{
GiftWrapping = Enums.GiftWrappingStyles.None
};
ClientLoginInfo clientLoginInfo = new ClientLoginInfo()
{
Email = "[email protected]",
Password = "ASDFG_12345"
};
new PurchaseContext(new SalesTaxOrderValidationStrategy()).PurchaseItem(itemUrl, itemPrice, clientLoginInfo, clientPurchaseInfo);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment