Esempio n. 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.BeforeSuite(_ =>
            {
                _.MigrateDatabase();
            });

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

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

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

            run.BeforeCase <IRequiresAuthenticatedUser>(_ =>
            {
                _.MakeSavingLogin(_.Fab().Make <User>());
            });
        }
        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();
            });
        }