Adding some coverage for the .Include EF statements

This commit is contained in:
Praburaj 2014-12-04 14:35:32 -08:00
parent b580856e66
commit a67bd6820c
2 changed files with 13 additions and 0 deletions

View File

@ -335,6 +335,16 @@ namespace E2ETests
Assert.Contains("<a href=\"/Admin/StoreManager\">Back to List</a>", responseContent, StringComparison.OrdinalIgnoreCase);
}
// This gets the view that non-admin users get to see.
private void GetAlbumDetailsFromStore(string albumId, string albumName)
{
Console.WriteLine("Getting details of album with Id '{0}'", albumId);
var response = httpClient.GetAsync(string.Format("Store/Details/{0}", albumId)).Result;
ThrowIfResponseStatusNotOk(response);
var responseContent = response.Content.ReadAsStringAsync().Result;
Assert.Contains(albumName, responseContent, StringComparison.OrdinalIgnoreCase);
}
private void AddAlbumToCart(string albumId, string albumName)
{
Console.WriteLine("Adding album id '{0}' to the cart", albumId);

View File

@ -149,6 +149,9 @@ namespace E2ETests
//Get details of the album
VerifyAlbumDetails(albumId, albumName);
//Get the non-admin view of the album.
GetAlbumDetailsFromStore(albumId, albumName);
//Add an album to cart and checkout the same
AddAlbumToCart(albumId, albumName);
CheckOutCartItems();