public void LoginAsAdmin() { _app.NavigateTo <HomeController>(c => c.LogOn("/Account")); _app.FindFormFor <LogOnModel>() .Field(f => f.Username).SetValueTo("admin") .Field(f => f.Password).SetValueTo("admin") .Submit(); _app.UrlMapsTo <AccountController>(c => c.Index()); }
public void LoginAsAdmin() { var cred = _lc.getCredentials("admin"); _app.NavigateTo <HomeController>(c => c.LogOn("/Account")); _app.FindFormFor <LogOnModel>() .Field(f => f.Username).SetValueTo(cred.Item1) .Field(f => f.Password).SetValueTo(cred.Item2) .Submit(); _app.UrlMapsTo <AccountController>(c => c.Index()); }