Example #1
0
        public new void SetUp()
        {
            testServer = new RainyTestServer ();
            testServer.Start ();

            syncServer = new WebSyncServer (testServer.BaseUri, testServer.GetAccessToken ());
        }
Example #2
0
        public new void SetUp()
        {
            testServer = new RainyTestServer();
            testServer.Start();

            syncServer = new WebSyncServer(testServer.BaseUri, testServer.GetAccessToken());
        }
Example #3
0
        public virtual void SetUp()
        {
            testServer = new RainyTestServer ();
            testServer.Start ();

            Config.Global = Config.ApplyJson (@"{ AdminPassword: '******' }");
        }
Example #4
0
        public virtual void SetUp()
        {
            testServer = new RainyTestServer();
            testServer.Start();

            Config.Global = Config.ApplyJson(@"{ AdminPassword: '******' }");
        }
        public new void SetUp()
        {
            testServer = new RainyTestServer();
            testServer.Start();

            accessToken     = testServer.GetAccessToken();
            this.syncServer = new WebSyncServer(testServer.ListenUrl, accessToken);
        }
Example #6
0
        public new void SetUp()
        {
            testServer = new RainyTestServer ();
            testServer.Start ();

            accessToken = testServer.GetAccessToken ();
            this.syncServer = new WebSyncServer (testServer.ListenUrl, accessToken);
        }
Example #7
0
        public void UnverifiedUserCannotAcquireAccessToken()
        {
            var user = getTestUser();

            client.Post <DTOUser> ("/api/user/signup/new/", user);

            testServer.Stop();
            testServer = new RainyTestServer(DatabaseBackend.DbAuthenticator);
            testServer.Start();

            testServer.TEST_USER = user.Username;
            testServer.TEST_PASS = user.Password;

            testServer.GetAccessToken();
        }
Example #8
0
        public new void SetUp()
        {
            testServer = new RainyTestServer ();
            if (dbScenario == "postgres") {
                testServer.ScenarioPostgres ();
            } else if (dbScenario == "sqlite" || string.IsNullOrEmpty (dbScenario)) {
                testServer.ScenarioSqlite ();
            }

            testServer.Start ();

            this.connFactory = RainyTestServer.Container.Resolve<IDbConnectionFactory> ();
            using (var db = connFactory.OpenDbConnection ()) {
                testUser = db.First<DBUser> (u => u.Username == RainyTestServer.TEST_USER);
            }
        }
Example #9
0
        public new void SetUp()
        {
            testServer = new RainyTestServer();
            if (dbScenario == "postgres")
            {
                testServer.ScenarioPostgres();
            }
            else if (dbScenario == "sqlite" || string.IsNullOrEmpty(dbScenario))
            {
                testServer.ScenarioSqlite();
            }

            testServer.Start();

            this.connFactory = RainyTestServer.Container.Resolve <IDbConnectionFactory> ();
            using (var db = connFactory.OpenDbConnection()) {
                testUser = db.First <DBUser> (u => u.Username == RainyTestServer.TEST_USER);
            }
        }
Example #10
0
        public void UnactivatedUserCannotAcquireAccessToken()
        {
            var user = getTestUser();

            client.Post <DTOUser> ("/api/user/signup/new/", user);

            // lookup activation key
            var secret = "";

            using (var db = DbConfig.GetConnection()) {
                var db_user = db.First <DBUser> (u => u.Username == user.Username);
                secret = db_user.VerifySecret;
                client.Get <VerifyUserRequest> ("/api/user/signup/verify/" + secret + "/");
            }

            testServer.Stop();
            testServer           = new RainyTestServer(DatabaseBackend.DbAuthenticator);
            testServer.TEST_USER = user.Username;
            testServer.TEST_PASS = user.Password;
            testServer.Start();

            testServer.GetAccessToken();
        }
Example #11
0
        public void UnverifiedUserCannotAcquireAccessToken()
        {
            var user = getTestUser ();
            client.Post<DTOUser> ("/api/user/signup/new/", user);

            testServer.Stop ();
            testServer = new RainyTestServer (DatabaseBackend.DbAuthenticator);
            testServer.Start ();

            testServer.TEST_USER = user.Username;
            testServer.TEST_PASS = user.Password;

            testServer.GetAccessToken ();
        }
Example #12
0
        public void UnactivatedUserCannotAcquireAccessToken()
        {
            var user = getTestUser ();
            client.Post<DTOUser> ("/api/user/signup/new/", user);

            // lookup activation key
            var secret = "";
            using (var db = DbConfig.GetConnection ()) {
                var db_user = db.First<DBUser> (u => u.Username == user.Username);
                secret = db_user.VerifySecret;
                client.Get<VerifyUserRequest> ("/api/user/signup/verify/" + secret + "/");
            }

            testServer.Stop ();
            testServer = new RainyTestServer (DatabaseBackend.DbAuthenticator);
            testServer.TEST_USER = user.Username;
            testServer.TEST_PASS = user.Password;
            testServer.Start ();

            testServer.GetAccessToken ();
        }