This commit is contained in:
2020-05-13 23:28:14 +00:00
parent 9716e67909
commit e08f352b7a
5 changed files with 25 additions and 79 deletions

View File

@@ -2,76 +2,22 @@ using Xunit;
namespace raven_integration
{
public class ServerStateTest
public class ServerStateTest
{
// ApiFixture fixture;
// public ServerStateTest(ApiFixture _fixture)
// {
// this.fixture = _fixture;
// }
/// <summary>
/// Test get state
/// </summary>
[Fact]
public async void ServerStateShouldReturnOk()
{
ApiResponse a = await Util.GetAsync("ServerState");
ApiResponse a = await Util.GetAsync("server-state");
Util.ValidateDataReturnResponseOk(a);
}
//can't test this because it fucks up other tests and the fixture
// /// <summary>
// /// Test set state
// /// </summary>
// [Fact]
// public async void ServerStateShouldSet()
// {
// /*{
// "serverState": "open"
// } */
// //open
// dynamic dd = new JObject();
// dd.serverState = "open";
// ApiResponse aa = await Util.PostAsync("ServerState", fixture.ManagerAuthToken, dd.ToString());
// Util.ValidateHTTPStatusCode(aa, 204);
// //close
// dynamic d = new JObject();
// d.serverState = "closed";
// ApiResponse a = await Util.PostAsync("ServerState", fixture.ManagerAuthToken, d.ToString());
// Util.ValidateHTTPStatusCode(a, 204);
// //open
// dynamic ddd = new JObject();
// dd.serverState = "open";
// ApiResponse aaa = await Util.PostAsync("ServerState", fixture.ManagerAuthToken, ddd.ToString());
// Util.ValidateHTTPStatusCode(aaa, 204);
// }
//NOTE: can't test set because it would break the other tests
//==================================================