コード例 #1
0
        protected ServiceStackTestBase()
        {
            DocumentStore = NewDocumentStore();
            IndexCreation.CreateIndexes(typeof(ServiceStackTestBase).Assembly, DocumentStore);
            IndexCreation.CreateIndexes(typeof(RavenUserAuthRepository).Assembly, DocumentStore);

            Host = new TestAppHost(DocumentStore);
            Host.Init();
            Host.Start(ListeningOn);

            Client = new JsonServiceClient(ListeningOn)
            {
                AlwaysSendBasicAuthHeader = true,
                UserName = Username,
                Password = Password
            };

            RegisterUser();

            WaitForIndexing(DocumentStore);
        }
コード例 #2
0
        protected ServiceStackTestBase()
        {
            DocumentStore = NewDocumentStore();
            IndexCreation.CreateIndexes(typeof(ServiceStackTestBase).Assembly, DocumentStore);
            IndexCreation.CreateIndexes(typeof(RavenUserAuthRepository).Assembly, DocumentStore);

            Host = new TestAppHost(DocumentStore);
            Host.Init();
            Host.Start(ListeningOn);

            Client = new JsonServiceClient(ListeningOn)
            {
                AlwaysSendBasicAuthHeader = true,
                UserName = Username,
                Password = Password
            };

            RegisterUser();

            WaitForIndexing(DocumentStore);
        }