first commit
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
using Xunit;
|
||||
using Landmark.OLA.Application;
|
||||
|
||||
namespace Landmark.OLA.Integration.Tests
|
||||
{
|
||||
public class StatusControllerTest : OlaIntegrationTest
|
||||
{
|
||||
|
||||
public StatusControllerTest(): base()
|
||||
{
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task CanGetStatus()
|
||||
{
|
||||
// The endpoint or route of the controller action.
|
||||
var httpResponse = await _client.GetAsync("/api/status/api/status");
|
||||
|
||||
// Must be successful.
|
||||
httpResponse.EnsureSuccessStatusCode();
|
||||
|
||||
// Deserialize and examine results.
|
||||
var stringResponse = await httpResponse.Content.ReadAsStringAsync();
|
||||
var status = JsonConvert.DeserializeObject<Status>(stringResponse);
|
||||
Assert.Equal("1.0.0.0", status.BuildVersion);
|
||||
}
|
||||
/*
|
||||
[Fact]
|
||||
public async Task CanGetRoot()
|
||||
{
|
||||
// The endpoint or route of the controller action.
|
||||
var httpResponse = await _client.GetAsync("/");
|
||||
|
||||
// Must be successful.
|
||||
Assert.Equal(HttpStatusCode.Redirect, httpResponse.StatusCode);
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user