public void ThenISeeAssetsSummaryCardsAndAllValuesAreCorrect(Table table) { ScenarioContext.Current.Add("Parameters Table", table); TableRows expected = table.Rows; List <AssetSummaryItemData> summaryCards = assetsTab.GetAssetsSummaryItems(); //check each item in given order, positions should match for (int i = 0; i < expected.Count; i++) { //expected values in this position TableRow row = expected[i]; string expTitle = row["Title"] + " (" + row["Count"] + ")"; string expRemainingValue = row["Remaining Value"]; string expPetitionValue = row["Petition Value"]; string expExemptions = row["Exemptions"]; string expSales = row["Sales"]; //actual values in this position AssetSummaryItemData item = summaryCards[i]; //verifications item.Title.Should().Be(expTitle, "Tile header text is " + expTitle + "for Summary Item #" + i); item.RemainingValue.Should().Be(expRemainingValue, "Card " + expTitle + " displays Remaining Value = " + expRemainingValue); item.PetitionValue.Should().Be(expPetitionValue, "Card " + expTitle + " displays Petition Value = " + expPetitionValue); item.Exemptions.Should().Be(expExemptions, "Card " + expTitle + " displays Exemptions = " + expExemptions); item.Sales.Should().Be(expSales, "Card " + expTitle + " displays Sales = " + expSales); } }