Skip to content
Jakub Raczek edited this page Apr 25, 2019 · 8 revisions

Each of test class should inherits ProjectTestBase public class HerokuappTestsNUnit : ProjectTestBase

namespace Ocaramba.Tests.NUnit.Tests
{
    using System.Collections.Generic;

    using global::NUnit.Framework;

    using Ocaramba;
    using Ocaramba.Tests.NUnit.DataDriven;
    using Ocaramba.Tests.PageObjects.PageObjects.TheInternet;

    [TestFixture]
    [Parallelizable(ParallelScope.Fixtures)]
    public class HerokuappTestsNUnit : ProjectTestBase
    {

        [Test]
        public void FormAuthenticationPageTest()
        {
            new InternetPage(this.DriverContext).OpenHomePage().GoToFormAuthenticationPage();

            var formFormAuthentication = new FormAuthenticationPage(this.DriverContext);
            formFormAuthentication.EnterUserName("tomsmith");
            formFormAuthentication.EnterPassword("SuperSecretPassword!");
            formFormAuthentication.LogOn();
            Assert.AreEqual("You logged into a secure area!", formFormAuthentication.GetMessage);
        }
    }
}
Clone this wiki locally