Ejemplo n.º 1
0
        public UserSeederTests()
        {
            _server = new TestServer(new WebHostBuilder()
                                     .UseEnvironment("Development")
                                     .UseContentRoot(Directory.GetCurrentDirectory())
                                     .UseStartup <Startup>());
            _client = _server.CreateClient();

            _devAuthOptions = new DevAuthenticationOptions();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Setup the test
        /// </summary>
        public ApiIntegrationTestBase()
        {
            _server = new TestServer(new WebHostBuilder()
                                     .UseEnvironment("Development")
                                     .UseContentRoot(Directory.GetCurrentDirectory())
                                     .UseStartup <Startup>());

            DevAuthenticationOptions devAuthOptions = new DevAuthenticationOptions();
            string testUserName = "******";

            _client = _server.CreateClient();
            _client.DefaultRequestHeaders.Add(devAuthOptions.AuthenticationTokenKey, testUserName);
        }