コード例 #1
0
ファイル: ScenarioSetupTearDown.cs プロジェクト: mastoj/NBlog
 public void LoggedIn()
 {
     AdminUserExists();
     WebBrowser.Current.GoTo(Config.Configuration.Host + NavigationHelper.Pages["login page"]);
     var logOffLink = WebBrowser.Current.Links.SingleOrDefault(y => y.Id == "logOff");
     if (logOffLink == null)
     {
         var formSteps = new FormSteps();
         var table = new Table("InputField", "Input");
         table.AddRow("UserName", "admin");
         table.AddRow("Password", "asdf1234");
         formSteps.WhenEnterTheFollowingInformation(table);
         formSteps.WhenIClickTheButton("log in");
     }
 }
コード例 #2
0
ファイル: LogInLogOffSteps.cs プロジェクト: mastoj/NBlog
 public void GivenIAmLoggedInAsTheAdminUser()
 {
     var user = new User() {Id = Guid.NewGuid(), Name = "Tomas", UserName = "******", PasswordHash = "asdf1234"};
     UserHelper.InsertUser(user);
     WebBrowser.Current.GoTo(Config.Configuration.Host + NavigationHelper.Pages["login page"]);
     var logOffLink = WebBrowser.Current.Links.SingleOrDefault(y => y.Id == "logOff");
     if (logOffLink == null)
     {
         var formSteps = new FormSteps();
         var table = new Table("InputField", "Input");
         table.AddRow("UserName", user.UserName);
         table.AddRow("Password", user.PasswordHash);
         formSteps.WhenEnterTheFollowingInformation(table);
         formSteps.WhenIClickTheButton("log in");
     }
 }