本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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");
}
示例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");
}
示例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");
}
}
示例9: CreateDynamicInstanceFromTable
public void CreateDynamicInstanceFromTable(Table table)
{
State.OriginalInstance = table.CreateDynamicInstance();
}
示例10: TransformToDynamicInstance
public dynamic TransformToDynamicInstance(Table table)
{
return table.CreateDynamicInstance();
}
示例11: CreateDynamicInstanceFromTable
public void CreateDynamicInstanceFromTable(Table table)
{
_instance = table.CreateDynamicInstance();
}
示例12: OnlyReservedChars
public void OnlyReservedChars(Table table)
{
try
{
State.OriginalInstance = table.CreateDynamicInstance();
}
catch (DynamicInstanceFromTableException ex)
{
ScenarioContext.Current.Set(ex);
}
}
示例13: DynamicTableTransform
public dynamic DynamicTableTransform(Table messageTable)
{
return messageTable.CreateDynamicInstance();
}
示例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);
}
示例15: ThenIShouldBeAbleToContactQAWorksWithTheFollowingInformation
public void ThenIShouldBeAbleToContactQAWorksWithTheFollowingInformation(Table table)
{
dynamic values = table.CreateDynamicInstance();
PropertiesCollection.currentPage.As<ContactUsPage>().CompleteFormWithValidDetails(values.Name, values.Email, values.Message);
}