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


C# Table.CreateDynamicInstance方法代码示例

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


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

示例1: ThenIShouldSeeFollowingUsername

 public void ThenIShouldSeeFollowingUsername(Table table)
 {
     var user = Document.TextField(Find.ById("NewUserName")).Text;
     var p = WebBrowser.Current.Page<RegistrationPage>();
     _instance = table.CreateDynamicInstance();
     Assert.AreEqual(_instance.UserName, p.UserName);
 }
开发者ID:syedshah,项目名称:SpecFlow,代码行数:7,代码来源:NewUserRegistrationSteps.cs

示例2: WhenFillOfTheRegistrationFormWithTheFollowingDetails

 public void WhenFillOfTheRegistrationFormWithTheFollowingDetails(Table table)
 {
     dynamic form = table.CreateDynamicInstance();
     CurrentPage.As<RegistrationPage>().PopulateUserNameTextBox(form.UserName + new Random(DateTime.Now.Second + DateTime.Now.Minute).Next(1, 9999).ToString());
     CurrentPage.As<RegistrationPage>().PopulatePasswordTextBox(form.Password);
     CurrentPage.As<RegistrationPage>().PopulateConfirmPasswordTextBox(form.ConfirmPassword);
 }
开发者ID:kartmcad,项目名称:ATDDDemo,代码行数:7,代码来源:UserRegistration.cs

示例3: UserRepositoryImpl

        public void ≈слиƒл¤ѕользовател¤—Idќбновл¤ютѕол¤(Guid id, Table table)
        {
            var user = RavenDb.CurrentStorageSession.Query<UserEntity>().Single(u => u.UserId == id).ToUser();

            dynamic data = table.CreateDynamicInstance();
            user.Password                                = data.ѕароль;
            user.Username                                = data.»м¤;
            user.ApplicationName                         = data.ApplicationName;
            user.Email                                   = data.Email;
            user.Comment                                 = data. омментарий;
            user.ConfirmationToken                       = data.ConfirmationToken;
            user.CreateDate                              = data.CreateDate;
            user.IsApproved                              = data.IsApproved;
            user.IsLockedOut                             = data.IsLockedOut;
            user.LastActivityDate                        = data.LastActivityDate;
            user.LastLockoutDate                         = data.LastLockoutDate;
            user.LastLoginDate                           = data.LastLoginDate;
            user.LastPasswordChangedDate                 = data.LastPasswordChangedDate;
            user.LastPasswordFailureDate                 = data.LastPasswordFailureDate;
            user.PasswordFailuresSinceLastSuccess        = data.PasswordFailuresSinceLastSuccess;
            user.PasswordVerificationToken               = data.PasswordVerificationToken;
            user.PasswordVerificationTokenExpirationDate = data.PasswordVerificationTokenExpirationDate;

            var userRepository = new UserRepositoryImpl(RavenDb.Storage);
            userRepository.SaveUser(user);
        }
开发者ID:fr4gles,项目名称:Building-Blocks,代码行数:26,代码来源:UserRepositorySteps.cs

示例4: WhenIEnterFollowingNewUserDetails

 public void WhenIEnterFollowingNewUserDetails(Table table)
 {
     var p = WebBrowser.Current.Page<RegistrationPage>();
     _instance = table.CreateDynamicInstance();
     p.UserName = _instance.UserName;
     p.EmailAddress = _instance.EmailAddress;
     p.Password = _instance.Password;
     p.ConfirmPassword = _instance.ConfirmPassword;
 }
开发者ID:syedshah,项目名称:SpecFlow,代码行数:9,代码来源:NewUserRegistrationSteps.cs

示例5: WhenFillInTheRegistrationFormWithTheFollowingDetails

 public void WhenFillInTheRegistrationFormWithTheFollowingDetails(Table table)
 {
     dynamic form = table.CreateDynamicInstance();
     var emailArr = form.Email.Split('@');
     var email = string.Format("{0}{1}@{2}", emailArr[0], RandomNumber(), emailArr[1]);
     CurrentPage.As<RegistrationPage>().PopulateEmailTextBox(email);
     CurrentPage.As<RegistrationPage>().PopulatePasswordTextBox(form.Password);
     CurrentPage.As<RegistrationPage>().PopulateConfirmPasswordTextBox(form.ConfirmPassword);
 }
开发者ID:SiteOneSoftware,项目名称:RegistrationFormBddTest,代码行数:9,代码来源:UserRegistration.cs

示例6: ThenAnErrorMessageShouldDisplayBelowTheEmailField

 public void ThenAnErrorMessageShouldDisplayBelowTheEmailField(Table table)
 {
     dynamic values = table.CreateDynamicInstance();
     var errorMessage = values.ErrorMsg;
     var errorMessageText = PropertiesCollection.currentPage.As<ContactUsPage>().InvalidEmailErrorMessage();
     var errorMessageDisplayed = PropertiesCollection.currentPage.As<ContactUsPage>().InvalidEmailErrorMessageDisplayed().Displayed;
     Assert.That(errorMessageDisplayed , "error message is missing");
     Assert.That(errorMessageText.Equals(errorMessage), "Wrong Error Email Message");
 }
开发者ID:eyongegbe,项目名称:AutomationWithSpecflow,代码行数:9,代码来源:ContactUsSteps.cs

示例7: ThenIShouldSeeTheResultForKeyword

 public void ThenIShouldSeeTheResultForKeyword(Table table)
 {
     dynamic tableDetail = table.CreateDynamicInstance();
     string key = tableDetail.Keyword;
     System.Threading.Thread.Sleep(2500);
     if (currentDriver.FindElement(By.PartialLinkText(key)).Displayed == true)
         Console.WriteLine("Control exists");
     else
         Console.WriteLine("Control not exist");
 }
开发者ID:mamax,项目名称:SpecflowFirst,代码行数:10,代码来源:GoogleSearchSteps.cs

示例8: WhenICreateAGenericDynamicInstanceFromThisTable

 public void WhenICreateAGenericDynamicInstanceFromThisTable(string type, Table table)
 {
     switch (type)
     {
         case "string":
             State.OriginalInstance = table.CreateDynamicInstance<string>();
             break;
         case "int":
             State.OriginalInstance = table.CreateDynamicInstance<int>();
             break;
         case "double":
             State.OriginalInstance = table.CreateDynamicInstance<double>();
             break;
         case "DateTime":
             State.OriginalInstance = table.CreateDynamicInstance<DateTime>();
             break;
         case "bool":
             State.OriginalInstance = table.CreateDynamicInstance<bool>();
             break;
         default:
             throw new ApplicationException("Unhandled value type");
     }         
 }
开发者ID:Lumirris,项目名称:SpecFlow.Assist.Dynamic,代码行数:23,代码来源:GenericDynamicInstanceCreationSteps.cs

示例9: CreateDynamicInstanceFromTable

 public void CreateDynamicInstanceFromTable(Table table)
 {
     State.OriginalInstance = table.CreateDynamicInstance();
 }
开发者ID:romerod,项目名称:SpecFlow.Assist.Dynamic,代码行数:4,代码来源:DynamicInstanceCreationSteps.cs

示例10: TransformToDynamicInstance

 public dynamic TransformToDynamicInstance(Table table)
 {
     return table.CreateDynamicInstance();
 }
开发者ID:TJDekker,项目名称:SpecFlow.Assist.Dynamic,代码行数:4,代码来源:DynamicStepArgumentTransformations.cs

示例11: CreateDynamicInstanceFromTable

 public void CreateDynamicInstanceFromTable(Table table)
 {
     _instance = table.CreateDynamicInstance();
 }
开发者ID:syedshah,项目名称:SpecFlow,代码行数:4,代码来源:DataTableSteps.cs

示例12: OnlyReservedChars

 public void OnlyReservedChars(Table table)
 {
     try
     {
         State.OriginalInstance = table.CreateDynamicInstance();                 
     }
     catch (DynamicInstanceFromTableException ex)
     {
         ScenarioContext.Current.Set(ex);
     }
 }
开发者ID:marcusoftnet,项目名称:SpecFlow.Assist.Dynamic,代码行数:11,代码来源:DynamicInstanceCreationSteps.cs

示例13: DynamicTableTransform

 public dynamic DynamicTableTransform(Table messageTable)
 {
     return messageTable.CreateDynamicInstance();
 }
开发者ID:rohanbaraskar,项目名称:SeleniumAutomationFramework,代码行数:4,代码来源:CustomTransforms.cs

示例14: WhenICompleteTheFormWithAnInvalidEmailAddress

 public void WhenICompleteTheFormWithAnInvalidEmailAddress(Table table)
 {
     dynamic values = table.CreateDynamicInstance();
     PropertiesCollection.currentPage.As<ContactUsPage>().EnterInvalidEmail(values.InvalidEmail);
     PropertiesCollection.currentPage.As<ContactUsPage>().EnterName(values.Name);
 }
开发者ID:eyongegbe,项目名称:AutomationWithSpecflow,代码行数:6,代码来源:ContactUsSteps.cs

示例15: ThenIShouldBeAbleToContactQAWorksWithTheFollowingInformation

 public void ThenIShouldBeAbleToContactQAWorksWithTheFollowingInformation(Table table)
 {
     dynamic values = table.CreateDynamicInstance();
     PropertiesCollection.currentPage.As<ContactUsPage>().CompleteFormWithValidDetails(values.Name, values.Email, values.Message);
 }
开发者ID:eyongegbe,项目名称:AutomationWithSpecflow,代码行数:5,代码来源:ContactUsSteps.cs


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