本文整理汇总了C#中TechTalk.SpecFlow.Table.CompareToSet方法的典型用法代码示例。如果您正苦于以下问题:C# Table.CompareToSet方法的具体用法?C# Table.CompareToSet怎么用?C# Table.CompareToSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TechTalk.SpecFlow.Table
的用法示例。
在下文中一共展示了Table.CompareToSet方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Then1
public void Then1(string batchNumber, Table table)
{
var task = CorrectCodelineBus.GetSingleResponseAsync(5);
task.Wait();
response = task.Result;
Assert.IsNotNull(response, "No response received");
Assert.IsFalse(string.IsNullOrEmpty(response.voucherBatch.scannedBatchNumber));
Assert.AreEqual(batchNumber, response.voucherBatch.scannedBatchNumber);
table.CompareToSet(response.voucher.Select(c => new
{
documentReferenceNumber = c.documentReferenceNumber.Trim(),
bsbNumber = c.bsbNumber.Trim(),
accountNumber = c.accountNumber.Trim(),
auxDom = c.auxDom.Trim(),
extraAuxDom = c.extraAuxDom.Trim(),
transactionCode = c.transactionCode.Trim(),
amount = c.amount.Trim(),
targetEndPoint = c.targetEndPoint.Trim(),
unprocessable = c.unprocessable,
repostFromDRN = c.repostFromDRN,
repostFromProcessingDate = (c.repostFromProcessingDate == null) ? string.Empty : ((System.DateTime)c.repostFromProcessingDate).ToString("yyyyMMdd"),
collectingBank = c.collectingBank
}));
}
示例2: ThenTheFollowingProductViewModelsShouldExistInTheProductTable
public void ThenTheFollowingProductViewModelsShouldExistInTheProductTable(Table table)
{
var database = ScenarioContext.Current["Database"] as dynamic;
IEnumerable<ProductViewModel> productViewModels = database.ProductViewModel.All().Cast<ProductViewModel>();
table.CompareToSet(productViewModels);
}
示例3: Then1
public void Then1(string batchNumber, Table table)
{
var task = CheckThirdPartyBus.GetSingleResponseAsync(5);
task.Wait();
response = task.Result;
Assert.IsNotNull(response, "No response received");
Assert.IsFalse(string.IsNullOrEmpty(response.voucherBatch.scannedBatchNumber));
Assert.AreEqual(batchNumber, response.voucherBatch.scannedBatchNumber);
table.CompareToSet(response.voucher.Select(c => new
{
documentReferenceNumber = c.voucher.documentReferenceNumber.Trim(),
bsbNumber = c.voucher.bsbNumber.Trim(),
accountNumber = c.voucher.accountNumber.Trim(),
auxDom = c.voucher.auxDom.Trim(),
extraAuxDom = c.voucher.extraAuxDom.Trim(),
transactionCode = c.voucher.transactionCode.Trim(),
amount = c.voucher.amount.Trim(),
//targetEndPoint = c.voucher.targetEndPoint.Trim(),
//unprocessable = c.voucher.unprocessable,
//repostFromDRN = c.voucher.repostFromDRN,
//repostFromProcessingDate = c.voucher.repostFromProcessingDate.ToString("yyyyMMdd")
}));
}
示例4: ThenIShouldSeeTheFollowingValuesOnTheWidgetWithDecimalPlaces
public void ThenIShouldSeeTheFollowingValuesOnTheWidgetWithDecimalPlaces(int decimalPlaces, Table expectedValues)
{
var s =
WidgetPage.GenerateNephilaStatsTable(
WidgetPage.ChangeIframeAndreturnDataFromWidget(
".section-content .widget:nth-of-type(3) .chartContainer"));
expectedValues.CompareToSet(s);
}
示例5: ThenThereArePeople
public void ThenThereArePeople(Table table)
{
var peopleRepo = RecallAidHelper.GetReal<PeopleRepo>();
var actualPeople = peopleRepo.GetAll();
table.CompareToSet(actualPeople);
}
示例6: ThenTheFollowingAdminAccountsShouldExistInTheDatabase
public void ThenTheFollowingAdminAccountsShouldExistInTheDatabase(Table table)
{
var db = GetTheDatabase();
IEnumerable<AdminAccount> adminAccounts = db["AdminAccounts"].All().Cast<AdminAccount>();
table.CompareToSet(adminAccounts.ToList());
}
示例7: AsLatestAdditions
public void AsLatestAdditions(Table table)
{
var viewModel = GetTheViewResult();
var latestsAdded = viewModel.LatestAddedKanbanBoards;
table.CompareToSet(latestsAdded);
}
示例8: AsMostFavorited
public void AsMostFavorited(Table table)
{
var viewModel = GetTheViewResult();
var topFavoritedKanbanBoards = viewModel.TopFavoritedKanbanBoards;
table.CompareToSet(topFavoritedKanbanBoards);
}
示例9: IShouldSeeTheFollowingActivites
public void IShouldSeeTheFollowingActivites(Table expectedActivites)
{
LatestActionResult.Should().Be.OfType(typeof(ViewResult)); // Asserts that you can read, please
var viewResult = LatestActionResult as ViewResult; // Asserts in the Then-step
var activities = viewResult.Model as IEnumerable<Activity>;
activities.Should().Not.Be.Null();
expectedActivites.CompareToSet(activities);
}
示例10: ThenTheFollowingItemsShouldBeInTheList
public void ThenTheFollowingItemsShouldBeInTheList(Table table)
{
if (_people != null)
table.CompareToSet(_people);
else if (_nullableTypeTesters != null)
table.CompareToSet(_nullableTypeTesters);
else if (_dynamicDictionaries != null)
table.CompareToDynamicSet(_dynamicDictionaries);
else
Assert.Fail("No items were found for comparison.");
}
示例11: ListedAsMyBoards
public void ListedAsMyBoards(Table table)
{
var actionResult = ScenarioContext.Current.Get<ActionResult>();
actionResult.Should().Be.OfType(typeof(ViewResult));
var viewResult = actionResult as ViewResult;
viewResult.ViewData.Model.Should().Be.OfType(typeof(MyBoardsViewModel));
var vm = viewResult.ViewData.Model as MyBoardsViewModel;
table.CompareToSet<KanbanBoard>(vm.Boards);
}
示例12: ThenTheFollowingValidationErrorsShouldBeDisplayed
public void ThenTheFollowingValidationErrorsShouldBeDisplayed(Table table)
{
var actualValidationErrors = Enumerable.Empty<ValidationError>();
var validationSummary = BrowserContext.Current.Browser.FindElement(By.ClassName("validation-summary-errors"));
if (validationSummary != null)
{
actualValidationErrors = validationSummary.FindElements(By.TagName("li")).Select(li => new ValidationError {Message = li.Text});
}
table.CompareToSet(actualValidationErrors);
}
示例13: ThenIAmReturnedADistinctListOfWordsInTheSentenceAndTheNumberOfTimesTheyHaveOccurred
public void ThenIAmReturnedADistinctListOfWordsInTheSentenceAndTheNumberOfTimesTheyHaveOccurred(Table table)
{
Window window = WordCountingFeature.Window;
var listView = window.Get<ListView>("WordCountListView");
window.WaitWhileBusy();
var wordCounts = (from row in listView.Rows
let word = row.Cells["Word"].Text
let count = row.Cells["Count"].Text
select new WordCount {Word = word, Count = count}).ToList();
table.CompareToSet(wordCounts);
}
示例14: Then1
public void Then1(string batchNumber, Table table)
{
var task = CorrectTransactionBus.GetSingleResponseAsync(5);
task.Wait();
response = task.Result;
Assert.IsNotNull(response, "No response received");
Assert.IsFalse(string.IsNullOrEmpty(response.voucherBatch.scannedBatchNumber));
Assert.AreEqual(batchNumber, response.voucherBatch.scannedBatchNumber);
table.CompareToSet(response.voucher);
}
示例15: Then1
public void Then1(string jobIdentifier, Table table)
{
if (request == null)
{
var task = GetVouchersInformationBus.GetRequestAsync(5);
task.Wait();
request = task.Result;
Assert.IsNotNull(request, "No response received");
}
table.CompareToSet(request.Single(_ => _.jobIdentifier == jobIdentifier).searchCriteria);
}