예제 #1
0
        public TimeEntryIntegrationTest()
        {
            Environment.SetEnvironmentVariable("MYSQL__CLIENT__CONNECTIONSTRING", DbTestSupport.TestDbConnectionString);
            DbTestSupport.ExecuteSql("TRUNCATE TABLE time_entries");

            _testClient = IntegrationTestServer.Start().CreateClient();
        }
예제 #2
0
        public TimeEntryIntegrationTest()
        {
            Environment.SetEnvironmentVariable("VCAP_SERVICES", DbTestSupport.TestDbVcapJson);
            DbTestSupport.ExecuteSql("TRUNCATE TABLE time_entries");

            _testClient = IntegrationTestServer.Start().CreateClient();
        }
 public ManagementIntegrationTest()
 {
     Environment.SetEnvironmentVariable("MYSQL__CLIENT__CONNECTIONSTRING", DbTestSupport.TestDbConnectionString);
     Environment.SetEnvironmentVariable("MANAGEMENT__ENDPOINTS__PATH", "/cloudfoundryapplication");
     DbTestSupport.ExecuteSql("TRUNCATE TABLE time_entries");
     _testClient = IntegrationTestServer.Start().CreateClient();
 }
예제 #4
0
        public EnvIntegrationTest()
        {
            Environment.SetEnvironmentVariable("PORT", "123");
            Environment.SetEnvironmentVariable("MEMORY_LIMIT", "512M");
            Environment.SetEnvironmentVariable("CF_INSTANCE_INDEX", "1");
            Environment.SetEnvironmentVariable("CF_INSTANCE_ADDR", "127.0.0.1");

            _testClient = IntegrationTestServer.Start().CreateClient();
        }
        public async Task ReturnsMessage()
        {
            _testClient = await IntegrationTestServer.GetHttpClient();

            var response = await _testClient.GetAsync("/");

            response.EnsureSuccessStatusCode();

            var expectedResponse = "hello from integration test";
            var actualResponse   = await response.Content.ReadAsStringAsync();

            Assert.Equal(expectedResponse, actualResponse);
        }
예제 #6
0
        public async Task ReturnsCloudFoundryEnv()
        {
            _testClient = await IntegrationTestServer.GetHttpClient();

            var response = await _testClient.GetAsync("/env");

            response.EnsureSuccessStatusCode();

            var expectedResponse =
                @"{""port"":""123"",""memoryLimit"":""512M"",""cfInstanceIndex"":""1"",""cfInstanceAddr"":""127.0.0.1""}";
            var actualResponse = await response.Content.ReadAsStringAsync();

            Assert.Equal(expectedResponse, actualResponse);
        }
 public TimeEntryIntegrationTest()
 {
     _testClient = IntegrationTestServer.Start().CreateClient();
 }
예제 #8
0
 public WelcomeIntegrationTest()
 {
     Environment.SetEnvironmentVariable("WELCOME_MESSAGE", "hello from integration test");
     _testClient = IntegrationTestServer.Start().CreateClient();
 }
 public ManagementIntegrationTest()
 {
     Environment.SetEnvironmentVariable("VCAP_SERVICES", TestDbVcapJson);
     ExecuteSql("TRUNCATE TABLE time_entries");
     _testClient = IntegrationTestServer.Start().CreateClient();
 }
예제 #10
0
 private async void Init()
 {
     Environment.SetEnvironmentVariable("MYSQL__CLIENT__CONNECTIONSTRING", DbTestSupport.TestDbConnectionString);
     DbTestSupport.ExecuteSql("TRUNCATE TABLE time_entries");
     _testClient = await IntegrationTestServer.GetHttpClient();
 }
 private async void Init()
 {
     _testClient = await IntegrationTestServer.GetHttpClient();
 }