예제 #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);
        }
        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);
        }