コード例 #1
0
        public BrowserFluent <MultiUserAccueilPage> Play(IBrowserFluent browserFluent)
        {
            if (Email == null)
            {
                Email = "*****@*****.**";
            }
            if (Password == null)
            {
                Password = "******";
            }
            if (Nom == null)
            {
                Nom = "DeNice";
            }
            if (Prenom == null)
            {
                Prenom = "Brice";
            }

            return(browserFluent.Display(new MultiUserAccueilPageQuery())
                   .Follow(p => p.Menu.Inscription)
                   .Fill(p => p.SInscrire.Command.Email, Email)
                   .Fill(p => p.SInscrire.Command.Password, Password)
                   .Fill(p => p.SInscrire.Command.PasswordConfirmation, Password)
                   .Fill(p => p.SInscrire.Command.Nom, Nom)
                   .Fill(p => p.SInscrire.Command.Prenom, Prenom)
                   .Submit(p => p.SInscrire)
                   .ThenFollow(r => r.UtilisateurPage)
                   .Click(p => p.Menu.SeDeconnecter)
                   .ThenFollow(r => r));
        }
コード例 #2
0
 public BrowserFluent <AccueilPage> Play(IBrowserFluent browserFluent, string nom)
 {
     return(browserFluent
            .Display(new AccueilPageQuery())
            .Follow(p => p.ListePostes)
            .Follow(p => p.NouveauPoste)
            .Fill(p => p.Creer.Command.Nom, nom)
            .Submit(p => p.Creer)
            .ThenFollow(r => r)
            .Display(new AccueilPageQuery()));
 }
コード例 #3
0
        /*
         * private readonly IRepository repository;
         * public ScenarioCreerPoste(IRepository repository)
         * {
         *  this.repository = repository;
         * }*/

        public BrowserFluent <AccueilPage> Play(IBrowserFluent browserFluent)
        {
            /*
             * if (NomPostes == null)
             * {
             *  var postesExistant = await (repository.Query<Poste>().ToArrayAsync()).Select(x => x.Nom).ToArray();
             *  for (var i = 0; i < NombreDePostes; ++i)
             *  {
             *
             *  }
             * }*/
            BrowserFluent <AccueilPage> result = null;

            foreach (var n in this.NomPostes)
            {
                result = Play(browserFluent, n);
            }
            return(result);
        }
コード例 #4
0
        public BrowserFluent <AccueilPage> Play(IBrowserFluent browserFluent)
        {
            scenarioCreerPoste.NomPostes = new string[] { "Voiture", "Alimentation" };

            return(browserFluent
                   .Display(new AccueilPageQuery())
                   .Play(scenarioCreerPoste)

                   .Display(new AccueilPageQuery())
                   .Follow(p => p.ListeDepenses)
                   .Follow(p => p.NouvelleDepense)

                   .Fill(p => p.PosteSelect.Selected, p => p.PosteSelect.Source.Result.First(x => x.Label == "Voiture"))
                   .Fill(p => p.Creer.Command.Description, "Plein d'essence")
                   .Fill(p => p.Creer.Command.Montant, 30)
                   .Fill(p => p.Creer.Command.Date, new DateTime(2000, 1, 1))
                   .Submit(p => p.Creer)
                   .ThenFollow(r => r)
                   .Display(new AccueilPageQuery()));
        }