Exemple #1
0
        public void ConfigureRun(TestRunConfig run)
        {
            // This run configurations only works for tests that inherits MiruTest
            // It includes FeatureTest, PageTest and all other Miru's types of tests

            run.TestingDefault();
        }
 public static void UserfyRequires <TUser>(this TestRunConfig run) where TUser : class, IUser
 {
     run.BeforeCase <IRequiresAuthenticatedUser>(_ =>
     {
         _.MakeSavingLogin <TUser>();
     });
 }
Exemple #3
0
        public void ConfigureRun(TestRunConfig run)
        {
            // This run configurations only works for tests that inherits MiruTest
            // It includes FeatureTest, PageTest, and all other Miru's types of tests

            run.BeforeSuite(_ =>
            {
                _.MigrateDatabase();
            });

            run.BeforeCase(_ =>
            {
                _.Logout();

                _.ClearFabricator();
                _.ClearDatabase();
                _.ClearQueue();
            });

            run.BeforeCase <AuthorizationTest>(_ =>
            {
                _.Logout();
            });

            run.BeforeCase <IRequiresAuthenticatedUser>(_ =>
            {
                _.MakeSavingLogin(_.Fab().Make <User>());
            });
        }
        public static void UserfyRequiresAdmin <TUser>(this TestRunConfig run) where TUser : class, ICanBeAdmin
        {
            run.BeforeCase <IRequiresAuthenticatedAdmin>(_ =>
            {
                _.MakeSavingLogin <TUser>(m => m.IsAdmin = true);
            });

            run.UserfyRequires <TUser>();
        }
Exemple #5
0
        public void ConfigureRun(TestRunConfig run)
        {
            run.PageTestingDefault();

            run.BeforeAll <IRequiresAuthenticatedUser>(_ =>
            {
                _.MakeSavingLogin <User>();
            });
        }
Exemple #6
0
        public void ConfigureRun(TestRunConfig run)
        {
            run.PageTestingDefault();

            run.UserfyRequiresAdmin <User>();

            run.BeforeSuite(_ =>
            {
                // configure some default returns for mocks
                _.Get <IPayPau>()
                .Charge(default, default)
        public static void TestingDefault(this TestRunConfig run)
        {
            run.BeforeSuite(_ =>
            {
                _.MigrateDatabase();
            });

            run.BeforeCase(_ =>
            {
                _.Logout();

                _.ClearFabricator();
                _.ClearDatabase();
                _.ClearQueue();
            });
        }
        public static void PageTestingDefault(this TestRunConfig run)
        {
            run.BeforeSuite(_ =>
            {
                _.MigrateDatabase();
                _.StartServer();
            });

            run.BeforeCase(_ =>
            {
                _.Logout();

                _.ClearDatabase();
                _.ClearFabricator();
            });

            run.AfterSuite(_ =>
            {
                _.QuitBrowser();
                _.StopServer();
            });
        }
Exemple #9
0
 public void ConfigureRun(TestRunConfig run)
 {
     run.PageTestingDefault();
 }
Exemple #10
0
        public void ConfigureRun(TestRunConfig run)
        {
            run.PageTestingDefault();

            run.UserfyRequires <User>();
        }