Last active
December 2, 2017 19:23
-
-
Save angelovstanton/1dc98c554fcae46d7691 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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