コード例 #1
0
ファイル: TestConfig.cs プロジェクト: michelanjos/Miru
        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();
        }
コード例 #2
0
 public static void UserfyRequires <TUser>(this TestRunConfig run) where TUser : class, IUser
 {
     run.BeforeCase <IRequiresAuthenticatedUser>(_ =>
     {
         _.MakeSavingLogin <TUser>();
     });
 }
コード例 #3
0
ファイル: TestConfig.cs プロジェクト: michelanjos/Miru
        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>());
            });
        }
コード例 #4
0
        public static void UserfyRequiresAdmin <TUser>(this TestRunConfig run) where TUser : class, ICanBeAdmin
        {
            run.BeforeCase <IRequiresAuthenticatedAdmin>(_ =>
            {
                _.MakeSavingLogin <TUser>(m => m.IsAdmin = true);
            });

            run.UserfyRequires <TUser>();
        }
コード例 #5
0
        public void ConfigureRun(TestRunConfig run)
        {
            run.PageTestingDefault();

            run.BeforeAll <IRequiresAuthenticatedUser>(_ =>
            {
                _.MakeSavingLogin <User>();
            });
        }
コード例 #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)
コード例 #7
0
        public static void TestingDefault(this TestRunConfig run)
        {
            run.BeforeSuite(_ =>
            {
                _.MigrateDatabase();
            });

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

                _.ClearFabricator();
                _.ClearDatabase();
                _.ClearQueue();
            });
        }
コード例 #8
0
        public static void PageTestingDefault(this TestRunConfig run)
        {
            run.BeforeSuite(_ =>
            {
                _.MigrateDatabase();
                _.StartServer();
            });

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

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

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

            run.UserfyRequires <User>();
        }