public void ThenThePersonCollectionShouldContainTheFollowingItemsFromThePersonCollection(string actualKey, string sourceKey, Table indices) { IList <Person> actualList = this.ScenarioContext.Get <IList <Person> >(actualKey); IList <Person> sourceList = this.ScenarioContext.Get <IList <Person> >(sourceKey); IList <Person> expectedList = PersonDriver.GetPeopleFromIndices(sourceList, indices); CollectionAssert.AreEqual(expectedList, actualList); }
public void ThenTheEntityInstanceOfPersonCollectionShouldContainTheFollowingItemsFromThePersonCollection(string actualKey, string sourceKey, Table indices) { IList <EntityInstance <Person> > entityInstanceList = this.ScenarioContext.Get <IList <EntityInstance <Person> > >(actualKey); IList <Person> sourceList = this.ScenarioContext.Get <IList <Person> >(sourceKey); IList <Person> expectedList = PersonDriver.GetPeopleFromIndices(sourceList, indices); CollectionAssert.AreEqual(expectedList, entityInstanceList.Select(e => e.Entity).ToList()); }