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

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

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

            Config.Global = Config.ApplyJson (@"{ AdminPassword: '******' }");
        }
Beispiel #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);
        }
Beispiel #6
0
        public new void SetUp()
        {
            testServer = new RainyTestServer ();
            testServer.Start ();

            accessToken = testServer.GetAccessToken ();
            this.syncServer = new WebSyncServer (testServer.ListenUrl, accessToken);
        }
Beispiel #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();
        }
Beispiel #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);
            }
        }
Beispiel #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);
            }
        }
Beispiel #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();
        }
Beispiel #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 ();
        }
Beispiel #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 ();
        }