Exemplo n.º 1
0
        public void ForceFailure()
        {
            AwesomeProjectModel model = new AwesomeProjectModel(this.app);
            string testButtonText     = model.GetTestButtonText();

            StringAssert.StartsWith("beginning", testButtonText, "The text of the Test button did not start with the expected value.");
        }
Exemplo n.º 2
0
        public void TestAlert()
        {
            AwesomeProjectModel model = new AwesomeProjectModel(this.app);

            model.TapTestButton();

            AwesomePopup popup     = new AwesomePopup(this.app);
            string       titleText = popup.GetTitle();

            Assert.AreEqual("Test Title", titleText, "The title of the alert box did not have the expected value.");

            string messageText = popup.GetMessage();

            Assert.AreEqual("Test alert message", messageText, "The message in the alert box did not have the expected value.");

            popup.TapOK();
        }
Exemplo n.º 3
0
        public void TestAlertWithScreenshots()
        {
            this.app.Screenshot("Launched");

            AwesomeProjectModel model = new AwesomeProjectModel(this.app);

            model.TapTestButton();
            this.app.Screenshot("Test button tapped");

            AwesomePopup popup     = new AwesomePopup(this.app);
            string       titleText = popup.GetTitle();

            this.app.Screenshot("Popup opened");
            Assert.AreEqual("Test Title", titleText, "The title of the alert box did not have the expected value.");

            string messageText = popup.GetMessage();

            Assert.AreEqual("Test alert message", messageText, "The message in the alert box did not have the expected value.");

            popup.TapOK();
            this.app.Screenshot("Popup OK button clicked");
        }