当前位置: 首页>>代码示例>>C#>>正文


C# Table.CompareToSet方法代码示例

本文整理汇总了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
            }));
        }
开发者ID:jhonner72,项目名称:plat,代码行数:27,代码来源:CorrectCodelineResponsePollingJobSteps.cs

示例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);
        }
开发者ID:JamesTryand,项目名称:Shoon,代码行数:7,代码来源:ProductViewModelSteps.cs

示例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")
            }));
        }
开发者ID:jhonner72,项目名称:plat,代码行数:27,代码来源:CheckThirdPartyResponsePollingJobSteps.cs

示例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);
 }
开发者ID:rohanbaraskar,项目名称:SeleniumAutomationFramework,代码行数:8,代码来源:WidgetStepDefinition.cs

示例5: ThenThereArePeople

        public void ThenThereArePeople(Table table)
        {
            var peopleRepo = RecallAidHelper.GetReal<PeopleRepo>();

            var actualPeople = peopleRepo.GetAll();

            table.CompareToSet(actualPeople);
        }
开发者ID:ITAGroup,项目名称:SpecAid,代码行数:8,代码来源:VersusAssistSteps.cs

示例6: ThenTheFollowingAdminAccountsShouldExistInTheDatabase

        public void ThenTheFollowingAdminAccountsShouldExistInTheDatabase(Table table)
        {
            var db = GetTheDatabase();

            IEnumerable<AdminAccount> adminAccounts = db["AdminAccounts"].All().Cast<AdminAccount>();

            table.CompareToSet(adminAccounts.ToList());
        }
开发者ID:burkhartt,项目名称:Bennington,代码行数:8,代码来源:AdminAccountSteps.cs

示例7: AsLatestAdditions

        public void AsLatestAdditions(Table table)
        {
            var viewModel = GetTheViewResult();

            var latestsAdded = viewModel.LatestAddedKanbanBoards;

            table.CompareToSet(latestsAdded);
        }
开发者ID:marcusoftnet,项目名称:KanbanBoards,代码行数:8,代码来源:KanbanBoardIndexViewModelSteps.cs

示例8: AsMostFavorited

        public void AsMostFavorited(Table table)
        {
            var viewModel = GetTheViewResult();

            var topFavoritedKanbanBoards = viewModel.TopFavoritedKanbanBoards;

            table.CompareToSet(topFavoritedKanbanBoards);
        }
开发者ID:marcusoftnet,项目名称:KanbanBoards,代码行数:8,代码来源:KanbanBoardIndexViewModelSteps.cs

示例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);
        }
开发者ID:KimmoKer,项目名称:ProgressiveNetDemos,代码行数:10,代码来源:ActivitiesControllerSteps.cs

示例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.");
 }
开发者ID:joebuschmann,项目名称:Nancy.Serialization.Csv,代码行数:11,代码来源:CsvDeserializerSteps.cs

示例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);
        }
开发者ID:marcusoftnet,项目名称:KanbanBoards,代码行数:11,代码来源:KanbanBoardControllerSteps.cs

示例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);
        }
开发者ID:gasparnagy,项目名称:CodeExample-SpecFlow-LivingHelp,代码行数:12,代码来源:ValidationSteps.cs

示例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);
    }
开发者ID:miobioha,项目名称:WordCounter,代码行数:13,代码来源:WordCountingSteps.cs

示例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);
        }
开发者ID:jhonner72,项目名称:plat,代码行数:13,代码来源:CorrectTransactionResponsePollingJobSteps.cs

示例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);
        }
开发者ID:jhonner72,项目名称:plat,代码行数:14,代码来源:GetVouchersInformationRequestPollingJobSteps.cs


注:本文中的TechTalk.SpecFlow.Table.CompareToSet方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。