當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。