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


C# Table.CompareToInstance方法代码示例

本文整理汇总了C#中TechTalk.SpecFlow.Table.CompareToInstance方法的典型用法代码示例。如果您正苦于以下问题:C# Table.CompareToInstance方法的具体用法?C# Table.CompareToInstance怎么用?C# Table.CompareToInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TechTalk.SpecFlow.Table的用法示例。


在下文中一共展示了Table.CompareToInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ThenHeShouldSeeAnAdminAccountEditFormWithTheFollowingValues

        public void ThenHeShouldSeeAnAdminAccountEditFormWithTheFollowingValues(Table table)
        {
            var actionResult = ScenarioContext.Current.Get<ActionResult>();
            var viewResult = ((ViewResult) actionResult);

            viewResult.Model.ShouldBeType(typeof (AdminAccountEditForm));

            var editForm = (AdminAccountEditForm) viewResult.Model;

            table.CompareToInstance(editForm);
        }
开发者ID:burkhartt,项目名称:Bennington,代码行数:11,代码来源:AdminAccountEditFormSteps.cs

示例2: ThenAnIncidentMessageIsSentToTheIncidentServiceExchangeWithRoutingKeyEmpty

        public void ThenAnIncidentMessageIsSentToTheIncidentServiceExchangeWithRoutingKeyEmpty(string routingKey, Table table)
        {
            var task = IncidentBus.GetSingleResponseAsync(5);
            task.Wait();

            var response = task.Result;

            Assert.IsNotNull(response, "No response received");

            table.CompareToInstance(response);
        }
开发者ID:jhonner72,项目名称:plat,代码行数:11,代码来源:CreateIncidentFromRequestSteps.cs

示例3: CompareToSetShouldNotMatch

        public void CompareToSetShouldNotMatch(Table tableToNotMatch)
        {
            var persons = ScenarioContext.Current.Get<List<Person>>();

            try
            {
                tableToNotMatch.CompareToInstance(persons);
            }
            catch (ComparisonException ex)
            {
                ex.Message.Should().Not.Be.Empty();
            }
        }
开发者ID:darrencauthon,项目名称:ProgressiveNetDemos,代码行数:13,代码来源:CompareToSteps.cs

示例4: ThenTheSigninResultShouldBeAsFollows

 public void ThenTheSigninResultShouldBeAsFollows(Table table)
 {
     var result = ScenarioContext.Current.Get<ViewResult>("controllerResponse");
     Assert.That(result, Is.Not.Null);
     var mainViewModel = result.Model as MainViewModel;
     Assert.That(mainViewModel, Is.Not.Null);
     if (mainViewModel != null)
     {
         var actual = mainViewModel.SignInViewModel;
         Assert.That(actual, Is.Not.Null);
         table.CompareToInstance(actual);
     }
 }
开发者ID:Naviam,项目名称:Shop-Any-Ware,代码行数:13,代码来源:SignInSteps.cs

示例5: ThenTheQuestionShouldAppearAtTheEndOfTheQuestionListAs

        public void ThenTheQuestionShouldAppearAtTheEndOfTheQuestionListAs(Table expectedQuestion)
        {
            var actualQuestions = BrowserContext.Current.Browser.FindElements(By.ClassName("question-info"))
                .Select(qi => new Question
                {
                    Title = qi.FindElement(By.ClassName("body")).Text,
                    Views = int.Parse(qi.FindElement(By.CssSelector(".views span")).Text),
                    Votes = int.Parse(qi.FindElement(By.CssSelector(".votes span")).Text)
                });

            var lastQuestion = actualQuestions.Last();

            expectedQuestion.CompareToInstance(lastQuestion);
        }
开发者ID:gasparnagy,项目名称:CodeExample-SpecFlow-LivingHelp,代码行数:14,代码来源:AskSteps.cs

示例6: ThenIGetTheRule

 public void ThenIGetTheRule(Table table)
 {
     var rule = ScenarioContext.Current.Get<Rule>("response invoice from John Galt");
     table.CompareToInstance(rule);
 }
开发者ID:RoyGI,项目名称:Specflow-Demo,代码行数:5,代码来源:ChainSteps.cs

示例7: Then3

 public void Then3(string batchNumber, Table table)
 {
     table.CompareToInstance(response.generatedVoucher.First().voucherBatch);
 }
开发者ID:jhonner72,项目名称:plat,代码行数:4,代码来源:GenerateCorrespondingVoucherResponsePollingJobSteps.cs

示例8: GetExceptionThrownByThisComparison

 private static ComparisonException GetExceptionThrownByThisComparison(Table table, ComparisonTest test)
 {
     try
     {
         table.CompareToInstance(test);
     }
     catch (ComparisonException ex)
     {
         return ex;
     }
     return null;
 }
开发者ID:darrencauthon,项目名称:SpecFlowAssist,代码行数:12,代码来源:InstanceComparisonExtensionMethodsTests.cs

示例9: ExceptionWasThrownByThisComparison

 private static bool ExceptionWasThrownByThisComparison(Table table, ComparisonTest test)
 {
     var exception = false;
     try
     {
         table.CompareToInstance(test);
     }
     catch (ComparisonException ex)
     {
         exception = true;
     }
     return exception;
 }
开发者ID:darrencauthon,项目名称:SpecFlowAssist,代码行数:13,代码来源:InstanceComparisonExtensionMethodsTests.cs

示例10: ThenIShouldHaveTheResultAsFollows

 public void ThenIShouldHaveTheResultAsFollows(Table table)
 {
     var actual = ScenarioContext.Current.Get<ViewResult>("controllerResponse");
     Assert.That(actual, Is.Not.Null);
     var mainModel = actual.Model as MainViewModel;
     Assert.That(mainModel, Is.Not.Null);
     Debug.Assert(mainModel != null, "mainModel != null");
     Assert.That(mainModel.SignUpViewModel, Is.Not.Null);
     table.CompareToInstance(mainModel.SignUpViewModel);
 }
开发者ID:Naviam,项目名称:Shop-Any-Ware,代码行数:10,代码来源:SignUpSteps.cs

示例11: ThenTheOrderViewModelShouldBeAsFollows

 public void ThenTheOrderViewModelShouldBeAsFollows(Table table)
 {
     var actual = ScenarioContext.Current.Get<OrderViewModel>();
     Assert.That(actual, Is.Not.Null);
     table.CompareToInstance(actual);
 }
开发者ID:Naviam,项目名称:Shop-Any-Ware,代码行数:6,代码来源:ShopperOrdersSteps.cs

示例12:

 public void 那麼GiftModel為(Table table)
 {
     table.CompareToInstance(this.gift);
 }
开发者ID:WiliamWu,项目名称:Api-Sample,代码行数:4,代码来源:字串轉換為Gift功能步驟.cs

示例13: ThenIShouldHaveTheFollowingDeliveryAddressAsAResult

 public void ThenIShouldHaveTheFollowingDeliveryAddressAsAResult(Table table)
 {
     var actual = ScenarioContext.Current.Get<DeliveryAddressViewModel>("actualInstance");
     Assert.That(actual, Is.Not.Null);
     table.CompareToInstance(actual);
 }
开发者ID:Naviam,项目名称:Shop-Any-Ware,代码行数:6,代码来源:DeliveryAddressesSteps.cs

示例14: ThenISeeThreadsInTable

        public void ThenISeeThreadsInTable(Table table)
        {
            var threads = ScenarioContext.Current.Get<Thread>();

            table.CompareToInstance<Thread>(threads);
        }
开发者ID:bwrobel,项目名称:Experts,代码行数:6,代码来源:ThreadsListSteps.cs

示例15: ThenTheProfileViewModelShouldBeAsFollows

 public void ThenTheProfileViewModelShouldBeAsFollows(Table table)
 {
     var model = ScenarioContext.Current.Get<ProfileViewModel>();
     table.CompareToInstance(model);
 }
开发者ID:Naviam,项目名称:Shop-Any-Ware,代码行数:5,代码来源:ProfileSteps.cs


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